signum
Returns the sign of a floating point number
Example
var sgn = consoleconsoleconsole
Output:
-101
Install
npm install signum
API
require("signum")(x)
Returns the sign of x
x
is a number
Returns One of the following values
-1
ifx<0
1
ifx>0
0
otherwise
Credits
(c) 2014 Mikola Lysenko. MIT License