Returns the sign of a floating point number
var sgn = require("signum")
console.log(sgn(-0.00001))
console.log(sng(0))
console.log(sng(Infinity))
Output:
-1
0
1
npm install signum
Returns the sign of x
x
is a number
Returns One of the following values
-1
ifx<0
1
ifx>0
0
otherwise
(c) 2014 Mikola Lysenko. MIT License