Exemplo n.º 1
0
 public static void Scale(ref Matrix2x2Wide m, ref Vector <float> scale, out Matrix2x2Wide result)
 {
     result.X.X = m.X.X * scale;
     result.X.Y = m.X.Y * scale;
     result.Y.X = m.Y.X * scale;
     result.Y.Y = m.Y.Y * scale;
 }
Exemplo n.º 2
0
 public static void MultiplyByTransposeWithoutOverlap(ref Matrix2x2Wide a, ref Matrix2x2Wide b, out Matrix2x2Wide result)
 {
     result.X.X = a.X.X * b.X.X + a.X.Y * b.X.Y;
     result.X.Y = a.X.X * b.Y.X + a.X.Y * b.Y.Y;
     result.Y.X = a.Y.X * b.X.X + a.Y.Y * b.X.Y;
     result.Y.Y = a.Y.X * b.Y.X + a.Y.Y * b.Y.Y;
 }
Exemplo n.º 3
0
 public static void MultiplyWithoutOverlap(ref Matrix2x2Wide a, ref Matrix2x3Wide b, out Matrix2x3Wide result)
 {
     result.X.X = a.X.X * b.X.X + a.X.Y * b.Y.X;
     result.X.Y = a.X.X * b.X.Y + a.X.Y * b.Y.Y;
     result.X.Z = a.X.X * b.X.Z + a.X.Y * b.Y.Z;
     result.Y.X = a.Y.X * b.X.X + a.Y.Y * b.Y.X;
     result.Y.Y = a.Y.X * b.X.Y + a.Y.Y * b.Y.Y;
     result.Y.Z = a.Y.X * b.X.Z + a.Y.Y * b.Y.Z;
 }
Exemplo n.º 4
0
        public static void InvertWithoutOverlap(ref Matrix2x2Wide m, out Matrix2x2Wide inverse)
        {
            var determinantInverse = Vector <float> .One / (m.X.X * m.Y.Y - m.X.Y * m.Y.X);

            inverse.X.X = m.Y.Y * determinantInverse;
            inverse.X.Y = -m.X.Y * determinantInverse;

            inverse.Y.X = -m.Y.X * determinantInverse;
            inverse.Y.Y = m.X.X * determinantInverse;
        }
Exemplo n.º 5
0
 public static void Subtract(ref Matrix2x2Wide a, ref Matrix2x2Wide b, out Matrix2x2Wide result)
 {
     Vector2Wide.Subtract(ref a.X, ref b.X, out result.X);
     Vector2Wide.Subtract(ref a.Y, ref b.Y, out result.Y);
 }
Exemplo n.º 6
0
 public static void Transform(ref Vector2Wide v, ref Matrix2x2Wide m, out Vector2Wide result)
 {
     TransformWithoutOverlap(ref v, ref m, out var temp);
     result = temp;
 }
Exemplo n.º 7
0
 public static void TransformWithoutOverlap(ref Vector2Wide v, ref Matrix2x2Wide m, out Vector2Wide result)
 {
     result.X = v.X * m.X.X + v.Y * m.Y.X;
     result.Y = v.X * m.X.Y + v.Y * m.Y.Y;
 }