Decimal
An exact base-10 number with up to 9 fractional digits.
Decimal is intended for mobility-data prices, fares, rates, and similar values. It stores a single scaled Long and never converts through Double or Float except in the explicitly lossy toDouble and toFloat helpers.
All values use a fixed internal scale of 9 fractional decimal places, so 2.5 and 2.50 are the same number. The representable range is -9223372036.854775808 through 9223372036.854775807.
Functions
Divides this value by other and rounds the result to 9 fractional digits using roundingMode.
Rounds this value to decimalPlaces fractional digits using roundingMode.
Returns this value as an Int if it is an integer in range.
Returns this value as a Long if it is an integer in range.
Returns the negation of this value.