Closed psambit9791 closed 3 years ago
The round() method under UtilMethods always gives the output in Ceil mode of rounding.
double d1 = 7.40241449; double d2 = -14.39767505; System.out.println(UtilMethods.round(d1, 1)); System.out.println(UtilMethods.round(d2, 1));
Outputs: 7.5 , -14.3
Expected: 7.4 , -14.4
Updating RoundingMethod from CEILING to HALF_EVEN.
Fixed.
The round() method under UtilMethods always gives the output in Ceil mode of rounding.
Outputs: 7.5 , -14.3
Expected: 7.4 , -14.4