abstract struct Number
Overview
The top-level number type.
Included Modules
- Comparable(Number)
- Steppable
Defined in:
what_happen/extension.crInstance Method Summary
-
#<=>(other) : Int32 | Nil
The comparison operator.
Instance methods inherited from class Object
<=>(other)
<=>,
what_happen?(expect) : Array(String)
what_happen?
Instance Method Detail
def <=>(other) : Int32 | Nil
#
The comparison operator.
Returns:
-1
ifself
is less than other0
ifself
is equal to other1
ifself
is greater than othernil
ifself
isNaN
or other isNaN
, becauseNaN
values are not comparable