/// <summary> /// Initialize using a position vector and a rotation matrix. /// </summary> /// <param name="position">The position.</param> /// <param name="r">The r.</param> public Transform(Vector2 position, ref Mat22 r) { Position = position; R = r; }
public static Vector2 Multiply(ref Mat22 A, ref Vector2 v) { return(new Vector2(A.col1.X * v.X + A.col2.X * v.Y, A.col1.Y * v.X + A.col2.Y * v.Y)); }
public static Vector2 MulT(ref Mat22 A, ref Vector2 v) { return(new Vector2(v.X * A.ex.X + v.Y * A.ex.Y, v.X * A.ey.X + v.Y * A.ey.Y)); }
public static void Add(ref Mat22 A, ref Mat22 B, out Mat22 R) { R = new Mat22(A.col1 + B.col1, A.col2 + B.col2); }
public static void Add(ref Mat22 A, ref Mat22 B, out Mat22 R) { R.ex = A.ex + B.ex; R.ey = A.ey + B.ey; }
public static Vector2 Mul(ref Mat22 A, ref Vector2 v) { return(new Vector2(A.ex.X * v.X + A.ey.X * v.Y, A.ex.Y * v.X + A.ey.Y * v.Y)); }
public static Vector2 MultiplyT(ref Mat22 A, ref Vector2 v) { return(new Vector2(v.X * A.Col1.X + v.Y * A.Col1.Y, v.X * A.Col2.X + v.Y * A.Col2.Y)); }
public static Vector2 Multiply(ref Mat22 A, ref Vector2 v) { return(new Vector2(A.Col1.x * v.x + A.Col2.x * v.y, A.Col1.y * v.x + A.Col2.y * v.y)); }
public static void Add(ref Mat22 A, ref Mat22 B, out Mat22 R) { R.Ex = A.Ex + B.Ex; R.Ey = A.Ey + B.Ey; }
public static void Add(ref Mat22 A, ref Mat22 B, out Mat22 R) { R.Col1 = A.Col1 + B.Col1; R.Col2 = A.Col2 + B.Col2; }
/// <summary> /// Initialize using a position vector and a rotation matrix. /// </summary> /// <param name="position">The position.</param> /// <param name="r">The r.</param> public Transform(ref Vector2 position, ref Mat22 r) { this.Position = position; this.R = r; }
public static Vector2 mulT(ref Mat22 A, Vector2 v) { return(mulT(ref A, ref v)); }
public static Vector2 MultiplyT(ref Mat22 A, ref Vector2 v) { return(new Vector2(v.x * A.Col1.x + v.y * A.Col1.y, v.x * A.Col2.x + v.y * A.Col2.y)); }
public static Vector2 MultiplyT(ref Mat22 A, Vector2 v) { return(MultiplyT(ref A, ref v)); }
public static Vector2 MulT(ref Mat22 A, Vector2 v) { return MulT(ref A, ref v); }
public static Vector2 MultiplyT(ref Mat22 A, ref Vector2 v) { return(new Vector2(Vector2.Dot(v, A.col1), Vector2.Dot(v, A.col2))); }
public static FVector2 MulT(ref Mat22 A, FVector2 v) { return(MulT(ref A, ref v)); }