Specifies rounding behaviour for numerical operations capable of discarding precision.
0 Rounds towards the nearest integer. If both neighboring integers are equidistant, rounds towards the even neighbor (Banker's rounding).
1 Rounds towards the nearest integer. If both neighboring integers are equidistant, rounds away from zero.
2 Rounds towards zero (truncate).
3 Rounds towards positive infinity (ceil).
4 Rounds towards negative infinity (floor).
Returns true if this enum value equals TIES_AWAY
Returns true if this enum value equals TIES_EVEN
Returns true if this enum value equals TO_NEGATIVE
Returns true if this enum value equals TO_POSITIVE
Returns true if this enum value equals TO_ZERO
Enum
Enum
Enum
Enum
Comparable(Enum)
Value
Object
Object
Object
Returns true if this enum value equals TO_NEGATIVE
Returns true if this enum value equals TO_POSITIVE
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Number/RoundingMode.html