Created
May 19, 2013 16:53
-
-
Save mateusfreira/5608234 to your computer and use it in GitHub Desktop.
JsNumber Arredondar sempre para cima
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.roundup= function(dec){ | |
if(this.toFixed(dec) < value) | |
return window.parseFloat(this.toFixed(dec))+(1/(Math.pow(10,dec))); | |
else | |
return window.parseFloat(this.toFixed(dec)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment