Package Exports
- signum
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (signum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
signum
Returns the sign of a floating point number
Example
var sgn = require("signum")
console.log(sgn(-0.00001))
console.log(sng(0))
console.log(sng(Infinity))
Output:
-1
0
1
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