[Javascript] Monetary Rounding (always up)
Ben Curtis
Quixote at LaMancha.org
Mon Aug 6 13:03:32 CDT 2001
> Is there any other way than splitting the number down after the decimal
> place, and then manually adding on 0.01 if the third number after the
> decimal point is greater than zero.
I think you could be fine with *always* adding 0.009 (no "if" test), then
reducing to two decimal places. Or you could
var RndUp = Math.ceil(Num * 100) / 100;
--
+Ben Curtis
"One of the symptoms of an approaching nervous breakdown
is the belief that one's work is terribly important."
- Bertrand Russell (1872-1970)
More information about the Javascript
mailing list