Here you can find the source of absRound(number)
/**/*from w w w . j a va2 s . c om*/ * * @param number * @returns {number} */ function absRound(number) { if (number < 0) { return Math.ceil(number); } else { return Math.floor(number); } }
Number.prototype.define("abs", function() { return Math.abs(this) })
Number.prototype.abs = function () { return Math.abs(this.valueOf());
Number.prototype.abs = function(){ return Math.abs(this); };