round

fun round(decimalPlaces: Int, roundingMode: RoundingMode): Decimal(source)

Rounds this value to decimalPlaces fractional digits using roundingMode.

decimalPlaces must be in 0..9. The returned value still uses the fixed internal scale of 9.