sign
func sign(n :
Number
) -> {-1 1} return 1 when n >= 0 return -1
Returns 1 times the sign of the given number. For example:
sign(-12.3) = -1 sign(12.3) = 1
See also:
abs
,
ceil
,
floor
,
frac
,
int
,
round
Herman Venter
This is
Slim
documentation as snarfed on 27 May 1999 by
dB
.