setScale

abstract fun setScale(scale: Int, roundingMode: Int): KBigDecimal

Returns a KBigDecimal with the specified scale and rounding mode.

Return

A KBigDecimal with the specified scale

Parameters

scale

The number of digits to the right of the decimal point

roundingMode

The rounding mode to apply (see RoundingMode constants)

Throws

if rounding is necessary but the rounding mode is UNNECESSARY