Fix rounding issues

This commit is contained in:
Teriuihi 2021-09-25 20:22:23 +02:00
parent 5ac582261c
commit fc46343454

View File

@ -23,8 +23,7 @@ public class Utilities {
scale = (int) Math.pow(10, precision + 1);
long tmp = (Math.round(num * scale));
while (tmp > 10)
tmp /= 10;
tmp %= 10;
if (tmp > 4)
total += 0.01;