public static Matrix operator +(Matrix matrix, double number) { if (matrix == null) { throw new ArgumentNullException(nameof(matrix)); } return(CalculateProvider.Add(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("Addition is impossible"); } return(CalculateProvider.Add(leftSide, rightSide)); }