plus

abstract operator fun plus(augend: BigDecimal?): BigDecimal

Returns a BigDecimal whose value is (this + augend), and whose _scale is max(this._scale(), augend._scale()).

Return

this + augend

Parameters

augend

value to be added to this BigDecimal.


abstract fun plus(augend: BigDecimal?, mc: MathContext): BigDecimal

Returns a BigDecimal whose value is (this + augend), with rounding according to the context settings.

If either number is zero and the _precision setting is nonzero then the other number, rounded if necessary, is used as the result.

Return

this + augend, rounded as necessary.

Since

1.5

Parameters

augend

value to be added to this BigDecimal.

mc

the context to use.

Throws

if the result is inexact but the rounding mode is UNNECESSARY.