Contents

Roo

Number.sign

Returns -1 if this number is negative, 1 if it’s positive and 0 if it’s zero.

-10.sign # => -1
0.sign # => 0
42.34.sign # => 1