
-----------------------------------
illzidaneyou
Tue Jan 12, 2010 6:34 pm

How to round a float or double to 2 decimal places?
-----------------------------------
What is the code for rounding a float or double to 2 decimal places?

The only rounding code I know is Math.round() but this only rounds to the nearest 0.5

Please let there be a code!

Any help is appreciated.

-----------------------------------
jbking
Tue Jan 12, 2010 6:55 pm

Re: How to round a float or double to 2 decimal places?
-----------------------------------
[url=http://forums.sun.com/thread.jspa?threadID=475442]Sun's forums has a thread about this already.
