Beispiel #1
0
 public static Vector2d Multiply(ref Matrix3x2d m, Vector2d v)
 {
     return new Vector2d(
         m.M00 * v.X + m.M10 * v.Y + m.M20,
         m.M01 * v.X + m.M11 * v.Y + m.M21
     );
 }
Beispiel #2
0
        public static void Multiply(ref Matrix3x2d left, ref Matrix3x2d right, out Matrix3x2d result)
        {
            result = new Matrix3x2d(
                left.M00 * right.M00 + left.M10 * right.M01,
                left.M01 * right.M00 + left.M11 * right.M01,

                left.M00 * right.M10 + left.M10 * right.M11,
                left.M01 * right.M10 + left.M11 * right.M11,

                left.M00 * right.M20 + left.M10 * right.M21 + left.M20,
                left.M01 * right.M20 + left.M11 * right.M21 + left.M21
            );
        }