Rounding

Decimal's rounding modes, inspired by com.ionspin.kotlin.bignum.decimal.RoundingMode.

Entries

Link copied to clipboard

Rounds towards negative infinity.

Link copied to clipboard

Rounds towards positive infinity.

Link copied to clipboard

Rounds away from zero.

Link copied to clipboard

Rounds towards zero (truncation).

Link copied to clipboard

Rounds towards nearest value at the target's scale, using away from zero as tiebreaker.

Link copied to clipboard

Rounds towards nearest value at the target's scale, using towards zero as a tiebreaker.

Link copied to clipboard

Rounds towards nearest value at the target's scale, using towards infinity as tiebreaker.

Link copied to clipboard

Rounds towards the nearest value at the target's scale, using towards negative infinity as a tiebreaker.

Link copied to clipboard

Rounds towards the nearest even value at the target's scale.

Link copied to clipboard

Rounds towards the nearest odd value at the target's scale.

Link copied to clipboard

Prohibits rounding.

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int