/// <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> #region public static JMatrix operator -(JMatrix value1, JMatrix value2) public static FPMatrix operator -(FPMatrix value1, FPMatrix value2) { FPMatrix result; FPMatrix.Multiply(ref value2, -FP.One, out value2); FPMatrix.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> #region public static JMatrix Add(JMatrix matrix1, JMatrix matrix2) public static FPMatrix Add(FPMatrix matrix1, FPMatrix matrix2) { FPMatrix result; FPMatrix.Add(ref matrix1, ref matrix2, out result); return(result); }
/// <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> #region public static JMatrix operator +(JMatrix value1, JMatrix value2) public static FPMatrix operator +(FPMatrix value1, FPMatrix value2) { FPMatrix result; FPMatrix.Add(ref value1, ref value2, out result); return(result); }