BEPUutilities.Matrix2x2.Transform C# (CSharp) Method

Transform() public static method

Transforms the vector by the matrix.
public static Transform ( Vector2 &v, Matrix2x2 &matrix, Vector2 &result ) : void
v Vector2 Vector2 to transform.
matrix Matrix2x2 Matrix to use as the transformation.
result Vector2 Product of the transformation.
return void
        public static void Transform(ref Vector2 v, ref Matrix2x2 matrix, out Vector2 result)
        {
            float vX = v.X;
            float vY = v.Y;
#if !WINDOWS
            result = new Vector2();
#endif
            result.X = vX * matrix.M11 + vY * matrix.M21;
            result.Y = vX * matrix.M12 + vY * matrix.M22;
        }