Node.js examples for Number:Algorithm
Get number sign
Math.sign = function (x) { return (x > 0) ? 1 : ( x < 0 ? -1 : 0 ); }