/// <summary> /// Adds two matrices. /// </summary> /// <param name="value1">The first matrix.</param> /// <param name="value2">The second matrix.</param> /// <returns>The sum of both values.</returns> public static TSMatrix4x4 operator +(TSMatrix4x4 value1, TSMatrix4x4 value2) { TSMatrix4x4 result; TSMatrix4x4.Add(ref value1, ref value2, out result); return(result); }
/// <summary> /// Matrices are added. /// </summary> /// <param name="matrix1">The first matrix.</param> /// <param name="matrix2">The second matrix.</param> /// <returns>The sum of both matrices.</returns> public static TSMatrix4x4 Add(TSMatrix4x4 matrix1, TSMatrix4x4 matrix2) { TSMatrix4x4 result; TSMatrix4x4.Add(ref matrix1, ref matrix2, out result); return(result); }
/// <summary> /// Subtracts two matrices. /// </summary> /// <param name="value1">The first matrix.</param> /// <param name="value2">The second matrix.</param> /// <returns>The difference of both values.</returns> public static TSMatrix4x4 operator -(TSMatrix4x4 value1, TSMatrix4x4 value2) { TSMatrix4x4 result; TSMatrix4x4.Multiply(ref value2, -FP.One, out value2); TSMatrix4x4.Add(ref value1, ref value2, out result); return(result); }