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.
«febbraio»
domlunmarmergiovensab
2627282930311
2345678
9101112131415
16171819202122
2324252627281
2345678