mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 16:14:26 +08:00
Fixed rounding
This commit is contained in:
parent
765866b6a5
commit
ec219907ec
@ -186,11 +186,6 @@ public class MathUtils {
|
|||||||
* @return The rounded number
|
* @return The rounded number
|
||||||
*/
|
*/
|
||||||
public static double round(double number) {
|
public static double round(double number) {
|
||||||
String formattedNumber = decimalFormat.format(number);
|
return Double.valueOf(decimalFormat.format(number));
|
||||||
if (formattedNumber.length() > 4) {
|
|
||||||
formattedNumber = formattedNumber.substring(0, 3); //Fix for unknown reasons for not-rounding
|
|
||||||
}
|
|
||||||
|
|
||||||
return Double.valueOf(formattedNumber);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user