This commit is contained in:
Raoul Van den Berge
2016-06-05 20:19:57 +02:00
parent 82c74f82b4
commit 956de867d6

View File

@@ -294,9 +294,9 @@ public class GuiGrid extends GuiBase {
}
if (qty >= 1000000) {
return String.format(Locale.US, "%.1f", Math.floor(qty / 1000000)).replace(".0", "") + "M";
return String.format(Locale.US, "%.1f", (float) qty / 1000000).replace(".0", "") + "M";
} else if (qty >= 1000) {
return String.format(Locale.US, "%.1f", Math.floor(qty / 1000)).replace(".0", "") + "K";
return String.format(Locale.US, "%.1f", (float) qty / 1000).replace(".0", "") + "K";
} else if (qty == 1) {
return null;
} else if (qty == 0) {