An ACS library for ZDoom-based ports
This is an old revision of the document!
int sgn(num x)
num - any numeric type (int or fixed)
Returns the sign of x as an integer.
1
0
-1
sgn(7) -> 1 sgn(-7) -> -1 sgn(12.3) -> 1 sgn(-12.3) -> -1 sgn(0) -> 0