Decimal

data class Decimal(val unscaled: BigInteger, val scale: Int) : Value

Constructors

Link copied to clipboard
constructor(unscaled: BigInteger, scale: Int)

Properties

Link copied to clipboard
open override val kind: String
Link copied to clipboard
val scale: Int
Link copied to clipboard
val unscaled: BigInteger

Functions

Link copied to clipboard
infix fun isExactAt(newScale: Int): Boolean
Link copied to clipboard
fun rescale(newScale: Int, rounding: Type.Decimal.Rounding): Value.Decimal

Rescale a decimal to a new scale, using rounding when the new scale cannot represent the value exactly.