예제 #1
0
 public static Vector2 InverseTransformedBy(this Vector2 point, SimpleTransform2D transform)
 {
     return((point - transform.Offset) / transform.Scale);
 }
예제 #2
0
 public static Rect TransformedBy(this Rect rect, SimpleTransform2D transform)
 {
     return(new Rect(rect.min * transform.Scale + transform.Offset, rect.size * transform.Scale));
 }