/// <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 VMatrix4x4 operator +(VMatrix4x4 value1, VMatrix4x4 value2) { VMatrix4x4 result; VMatrix4x4.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 VMatrix4x4 Add(VMatrix4x4 matrix1, VMatrix4x4 matrix2) { VMatrix4x4 result; VMatrix4x4.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 VMatrix4x4 operator -(VMatrix4x4 value1, VMatrix4x4 value2) { VMatrix4x4 result; VMatrix4x4.Multiply(ref value2, -1, out value2); VMatrix4x4.Add(ref value1, ref value2, out result); return(result); }