Nez.Portable/Utils/Extensions/Vector2Ext.cs
/// <summary>
/// Creates a new <see cref="Vector2"/> that contains a transformation of 2d-vector by the specified <see cref="Matrix"/>.
/// </summary>
/// <param name="position">Source <see cref="Vector2"/>.</param>
/// <param name="matrix">The transformation <see cref="Matrix"/>.</param>
/// <param name="result">Transformed <see cref="Vector2"/> as an output parameter.</param>
Creates a new  that contains a transformation of 2d-vector by the specified .
Creates a new that contains a transformation of 2d - vector by the specified .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void transform(ref Vector2 position, ref Matrix2D matrix, out Vector2 result)
        {
            var x = (position.X * matrix.M11) + (position.Y * matrix.M21) + matrix.M31;
            var y = (position.X * matrix.M12) + (position.Y * matrix.M22) + matrix.M32;
            result.X = x;
            result.Y = y;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static void transform ( ref Vector2 position , ref Matrix2D matrix , out Vector2 result ) { var x = ( position . X * matrix . M11 ) + ( position . Y * matrix . M21 ) + matrix . M31 ; var y = ( position . X * matrix . M12 ) + ( position . Y * matrix . M22 ) + matrix . M32 ; result . X = x ; result . Y = y ; }
Creates a new  that contains a transformation of 2d-vector by the specified .
Creates a new that contains a transformation of 2d - vector by the specified .
Vector2
out
Matrix2D
ref
position
None
matrix
The transformation .
The transformation .
result
Transformed  as an output parameter.
Transformed as an output parameter .