Posted: 3/6/2010
Hi,
I have a number say 13.34445466 , I want to round this to two digits after decimal. I want to do this in javascript.
function roundNumber(inputNumber, numberOfDigits)
{
var multiple = Math.pow(10, numberOfDigits);
var output = Math.round(inputNumber * multiple) / multiple;
return output;
}