Return to Snippet

Revision: 54172
at December 13, 2011 22:22 by dato


Initial Code
function roundNumber(numero, dec) {
        var num=parseFloat(numero);
	var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
	return result;
}

Initial URL


Initial Description
Rounds a number to a given decimal quantity

Initial Title
Round to certain decimal points

Initial Tags


Initial Language
JavaScript