rounding double to two decimal places
is there an easy way to round a double to two decimal places?
i.e. 1.98999 would round to 1.99
the math.round method only rounds to nearest integer.
decimalformat class converts number to a string.
i figure there must be an easy way to do this...?? pls advise
Thanks for help with that...
Thanks for your help with that post. Am I insane, or does anyone else think that it's crazy not to have a simple already built function in Java to round a double to specified # of decimal places?
Am I missing something? Why would everyone want to custom code this function?