/// <summary> /// Adds a value to the current instance of <see cref="BigDecimal"/>, /// rounding the result according to the provided context. /// </summary> /// <param name="augend">The value to be added to this instance.</param> /// <param name="mc">The rounding mode and precision for the result of /// this operation.</param> /// <returns> /// Returns a new <see cref="BigDecimal"/> whose value is <c>this + <paramref name="augend"/></c>. /// </returns> /// <exception cref="ArgumentNullException"> /// If the given <paramref name="augend"/> or <paramref name="mc"/> is <c>null</c>. /// </exception> public static BigDecimal Add(BigDecimal value, BigDecimal augend, MathContext mc) { return(BigDecimalMath.Add(value, augend, mc)); }
/// <summary> /// Adds a value to the current instance of <see cref="BigDecimal"/>. /// The scale of the result is the maximum of the scales of the two arguments. /// </summary> /// <param name="augend">The value to be added to this instance.</param> /// <returns> /// Returns a new {@code BigDecimal} whose value is <c>this + <paramref name="augend"/></c>. /// </returns> /// <exception cref="ArgumentNullException"> /// If the given <paramref name="augend"/> is <c>null</c>. /// </exception> public static BigDecimal Add(BigDecimal value, BigDecimal augend) { return(BigDecimalMath.Add(value, augend)); }