public static Matrix operator -(Matrix matrix, double number) { if (matrix == null) { throw new ArgumentNullException(nameof(matrix)); } return(CalculateProvider.Substract(matrix, number)); }
public static Matrix operator -(Matrix leftSide, Matrix rightSide) { if (leftSide == null) { throw new ArgumentNullException(nameof(leftSide)); } if (rightSide == null) { throw new ArgumentNullException(nameof(rightSide)); } if (leftSide.RowsCount != rightSide.RowsCount || leftSide.ColumnsCount != rightSide.ColumnsCount) { throw new DimensionsDontMatchException("Substraction is impossible"); } return(CalculateProvider.Substract(leftSide, rightSide)); }