Top index Wirbel home

::sign

sign(int a) - returns the sign of the integer a
sign(float a) - returns the sign of the float a

sign(int a) returns -1, 0 or 1, depending on if a is negative, zero or positive, resp.

sign(float a) returns -1.0, 0.0 or 1.0, depending on if a is negative, 0.0 or positive, resp.

See also

abs