Round in javascript

function roundTo(decimalpositions)
{
    var i = this * Math.pow(10,decimalpositions);
    i = Math.round(i);
    return i / Math.pow(10,decimalpositions);
}
Number.prototype.roundTo = roundTo;

posted @ venerdì 28 novembre 2008 12:24

Print

Comments on this entry:

# re: Round in javascript

Left by he at 13/11/2014 18:44
Gravatar
becoming fundamentally mobile check credit score product news cost credit report score important rolling out 079
Comments have been closed on this topic.
«novembre»
domlunmarmergiovensab
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567