DecimalMode

data class DecimalMode(val decimalPrecision: Long = 0, val roundingMode: RoundingMode = RoundingMode.NONE, val scale: Long = -1)

Decimal precision signifies how many digits will significand have. If decimal precision is 0 and RoundingMode is NONE infinite precision is used.

Parameters

decimalPrecision

max number of digits allowed. Default 0 is unlimited precision.

roundingMode

default RoundingMode.NONE is used with unlimited precision and no specified scale. Otherwise specify mode that is used for rounding when decimalPrecision is exceeded, or when scale is in use.

scale

is number of digits to the right of the decimal point. When this is specified, a RoundingMode that is not RoundingMode.NONE is also required. Scale cannot be greater than precision - 1. If left to default = null, no scale will be used. Rounding and decimalPrecision apply. Negative scale numbers are not supported. Using scale will increase the precision to required number of digits.

Constructors

Link copied to clipboard
constructor(decimalPrecision: Long = 0, roundingMode: RoundingMode = RoundingMode.NONE, scale: Long = -1)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scale: Long
Link copied to clipboard