round

fun Decimal.round(scale: Int, roundingMode: RoundingMode = RoundingMode.RoundHalfEven): Decimal

Rounds a Decimal to a scale.

Return

A Decimal rounded to scale digits after the decimal point.

Parameters

scale

The number of digits the rounded value should have after its decimal point.

roundingMode

The RoundingMode to apply when scaling.