angst
01-05-2006, 04:43 PM
hello,
I've built this little function for rounding numbers, money totals in particular.
function roundme(number) {
var result=Math.round(number*100)/100
return result;
}
the problem is that is seems to always around to only one decimal place,
like $1960.4
so, my question is, how can I make sure that it always comes out as two decimal places like it should when calculating money?
thanks in advance for your time!
-Ken
I've built this little function for rounding numbers, money totals in particular.
function roundme(number) {
var result=Math.round(number*100)/100
return result;
}
the problem is that is seems to always around to only one decimal place,
like $1960.4
so, my question is, how can I make sure that it always comes out as two decimal places like it should when calculating money?
thanks in advance for your time!
-Ken