Esempio n. 1
0
 /// <summary>Linearly interpolates between the corresponding values of two matrices.</summary>
 /// <param name="matrix1">The first source matrix.</param>
 /// <param name="matrix2">The second source matrix.</param>
 /// <param name="amount">The relative weight of the second source matrix.</param>
 /// <returns>The interpolated matrix.</returns>
 public static unsafe Matrix4X3 <T> Lerp <T>(Matrix4X3 <T> matrix1, Matrix4X3 <T> matrix2, T amount)
     where T : unmanaged, IFormattable, IEquatable <T>, IComparable <T>
 {
     return(new(
                Vector3D.Lerp(matrix1.Row1, matrix2.Row1, amount),
                Vector3D.Lerp(matrix1.Row2, matrix2.Row2, amount),
                Vector3D.Lerp(matrix1.Row3, matrix2.Row3, amount),
                Vector3D.Lerp(matrix1.Row4, matrix2.Row4, amount)
                ));
 }
Esempio n. 2
0
 public static Matrix4X3 <T> Subtract <T>(Matrix4X3 <T> value1, Matrix4X3 <T> value2)
     where T : unmanaged, IFormattable, IEquatable <T>, IComparable <T>
 => value1 - value2;
Esempio n. 3
0
 public static Matrix4X3 <T> Negate <T>(Matrix4X3 <T> value)
     where T : unmanaged, IFormattable, IEquatable <T>, IComparable <T>
 => - value;
Esempio n. 4
0
 public static Vector3D <T> Multiply <T>(Vector4D <T> value1, Matrix4X3 <T> value2)
     where T : unmanaged, IFormattable, IEquatable <T>, IComparable <T>
 => value1 * value2;
Esempio n. 5
0
 public static Matrix3X3 <T> Multiply <T>(Matrix3X4 <T> value1, Matrix4X3 <T> value2)
     where T : unmanaged, IFormattable, IEquatable <T>, IComparable <T>
 => value1 * value2;
Esempio n. 6
0
 public static Matrix4X3 <T> Add <T>(Matrix4X3 <T> value1, Matrix4X3 <T> value2)
     where T : unmanaged, IFormattable, IEquatable <T>, IComparable <T>
 {
     return(value1 + value2);
 }