public Vector2 InverseTransformDirection(Vector2 vector) { #if USE_MATRIX_FOR_ROTATION return(Math.MulT(rotation, vector)); #else return(Quaternion.Inverse(rotation).Xyz().ToVector2() * vector); #endif }
public static Vector2 MulT(Transform T, Vector2 v) { #if USE_MATRIX_FOR_ROTATION return(Math.MulT(T.R, v - T.position)); #else return(T.InverseTransformDirection(v - T.position)); #endif }
public Vector2 InverseTransformPoint(Vector2 vector) { return(Math.MulT(R, vector - position)); }
public static Vec2 MulT(XForm T, Vec2 v) { return(Math.MulT(T.R, v - T.Position)); }
public Vector2 InverseTransformDirection(Vector2 vector) { return(Math.MulT(R, vector)); }