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
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011