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.
«aprile»
domlunmarmergiovensab
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910