Documentation
›
API Reference
›
Object
›
Math
Sgn
Lua
C++
This function returns the sign of the input value.
Syntax
static float
Sgn
(float f)
Parameters
f:
input value.
Returns
If the input value if less than 0.0 then -1 is returned, otherwise 1 is returned.