An ACS library for ZDoom-based ports
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