See Original text in context
method sign(Real:)
Returns -1
if the number is negative, 0
if it is zero and 1
otherwise.
See Original text in context
method sign()
Coerces the invocant to Numeric and returns its sign, that is, 0 if the number is 0, 1 for positive and -1 for negative values.
say 6.sign; # OUTPUT: «1»say (-6).sign; # OUTPUT: «-1»say "0".sign; # OUTPUT: «0»