public static void MultiplyByTransposeWithoutOverlap(ref Matrix2x3Wide a, ref Matrix2x3Wide b, out Matrix2x2Wide result) { result.X.X = a.X.X * b.X.X + a.X.Y * b.X.Y + a.X.Z * b.X.Z; result.X.Y = a.X.X * b.Y.X + a.X.Y * b.Y.Y + a.X.Z * b.Y.Z; result.Y.X = a.Y.X * b.X.X + a.Y.Y * b.X.Y + a.Y.Z * b.X.Z; result.Y.Y = a.Y.X * b.Y.X + a.Y.Y * b.Y.Y + a.Y.Z * b.Y.Z; }
public static void Scale(ref Matrix2x3Wide m, ref Vector <float> scale, out Matrix2x3Wide result) { result.X.X = m.X.X * scale; result.X.Y = m.X.Y * scale; result.X.Z = m.X.Z * scale; result.Y.X = m.Y.X * scale; result.Y.Y = m.Y.Y * scale; result.Y.Z = m.Y.Z * scale; }
public static void MultiplyWithoutOverlap(ref Matrix2x3Wide a, ref Matrix3x3Wide b, out Matrix2x3Wide result) { result.X.X = a.X.X * b.X.X + a.X.Y * b.Y.X + a.X.Z * b.Z.X; result.X.Y = a.X.X * b.X.Y + a.X.Y * b.Y.Y + a.X.Z * b.Z.Y; result.X.Z = a.X.X * b.X.Z + a.X.Y * b.Y.Z + a.X.Z * b.Z.Z; result.Y.X = a.Y.X * b.X.X + a.Y.Y * b.Y.X + a.Y.Z * b.Z.X; result.Y.Y = a.Y.X * b.X.Y + a.Y.Y * b.Y.Y + a.Y.Z * b.Z.Y; result.Y.Z = a.Y.X * b.X.Z + a.Y.Y * b.Y.Z + a.Y.Z * b.Z.Z; }
public static void MatrixSandwich(ref Matrix2x3Wide m, ref Triangular3x3Wide t, out Triangular2x2Wide result) { var i11 = m.X.X * t.M11 + m.X.Y * t.M21 + m.X.Z * t.M31; var i12 = m.X.X * t.M21 + m.X.Y * t.M22 + m.X.Z * t.M32; var i13 = m.X.X * t.M31 + m.X.Y * t.M32 + m.X.Z * t.M33; var i21 = m.Y.X * t.M11 + m.Y.Y * t.M21 + m.Y.Z * t.M31; var i22 = m.Y.X * t.M21 + m.Y.Y * t.M22 + m.Y.Z * t.M32; var i23 = m.Y.X * t.M31 + m.Y.Y * t.M32 + m.Y.Z * t.M33; result.M11 = i11 * m.X.X + i12 * m.X.Y + i13 * m.X.Z; result.M21 = i21 * m.X.X + i22 * m.X.Y + i23 * m.X.Z; result.M22 = i21 * m.Y.X + i22 * m.Y.Y + i23 * m.Y.Z; }
public static void SandwichScale(ref Matrix2x3Wide m, ref Vector <float> scale, out Triangular2x2Wide result) { result.M11 = scale * (m.X.X * m.X.X + m.X.Y * m.X.Y + m.X.Z * m.X.Z); result.M21 = scale * (m.Y.X * m.X.X + m.Y.Y * m.X.Y + m.Y.Z * m.X.Z); result.M22 = scale * (m.Y.X * m.Y.X + m.Y.Y * m.Y.Y + m.Y.Z * m.Y.Z); }
public static void Negate(ref Matrix2x3Wide m, out Matrix2x3Wide result) { Vector3Wide.Negate(ref m.X, out result.X); Vector3Wide.Negate(ref m.Y, out result.Y); }
public static void TransformByTransposeWithoutOverlap(ref Vector3Wide v, ref Matrix2x3Wide m, out Vector2Wide result) { result.X = v.X * m.X.X + v.Y * m.X.Y + v.Z * m.X.Z; result.Y = v.X * m.Y.X + v.Y * m.Y.Y + v.Z * m.Y.Z; }
public static void Add(ref Matrix2x3Wide a, ref Matrix2x3Wide b, out Matrix2x3Wide result) { Vector3Wide.Add(ref a.X, ref b.X, out result.X); Vector3Wide.Add(ref a.Y, ref b.Y, out result.Y); }
public static void Transform(ref Vector2Wide v, ref Matrix2x3Wide m, out Vector3Wide 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; result.Z = v.X * m.X.Z + v.Y * m.Y.Z; }