unaryPlus

open operator override fun unaryPlus(): BigDecimal

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

This method, which simply returns this BigDecimal is included for symmetry with the unary minus method .

Return

this.

Since

1.5

See also

.unaryMinus


open override fun unaryPlus(mc: MathContext): BigDecimal

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

The effect of this method is identical to that of the method.

Return

this, rounded as necessary. A zero result will have a _scale of 0.

Since

1.5

Parameters

mc

the context to use.

See also

.round

Throws

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