Fixed rounding

This commit is contained in:
Fuzzlemann 2017-07-29 23:15:53 +02:00
parent 765866b6a5
commit ec219907ec

View File

@ -186,11 +186,6 @@ public class MathUtils {
* @return The rounded number
*/
public static double round(double number) {
String formattedNumber = decimalFormat.format(number);
if (formattedNumber.length() > 4) {
formattedNumber = formattedNumber.substring(0, 3); //Fix for unknown reasons for not-rounding
}
return Double.valueOf(formattedNumber);
return Double.valueOf(decimalFormat.format(number));
}
}