Rounding Issue
For Example
- 598.59 ya 591.45 to be convert 600.
- 541.0 to be convert 550.
-
541.59 to be convert 550.
Just check the last 2 digit ignore the
decimal value. if last 2 digit in
between 11- 19 it will converted 20 if
21-29 then will converted 30 and so on..
So What can i do for this.
Need ur Help.
thanks in advance….
Use MathUtils [Commons Math] :
–
static double round(double x, int scale)or–
static double round(double x, int scale, int roundingMethod)For update in question
Cast to double to make sure
round(double x, ...)is use, instead ofround(float x, ...).