/ Published in: JavaScript
Expand |
Embed | Plain Text
Number.prototype.toFixed=function(x) { var temp=this; temp=Math.round(temp*Math.pow(10,x))/Math.pow(10,x); return temp; }
You need to login to post a comment.
clapfouine on 03/26/07
javascript float decimal real prototype integer round tofixed
1 person have marked this snippet as a favorite
Number.prototype.toFixed=function(x) { var temp=this; temp=Math.round(temp*Math.pow(10,x))/Math.pow(10,x); return temp; }
You need to login to post a comment.