Skip to content

Instantly share code, notes, and snippets.

@mateusfreira
Created May 19, 2013 16:53
Show Gist options
  • Save mateusfreira/5608234 to your computer and use it in GitHub Desktop.
Save mateusfreira/5608234 to your computer and use it in GitHub Desktop.
JsNumber Arredondar sempre para cima
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