Display after decimal point on big amounts

This commit is contained in:
Raoul Van den Berge
2016-03-25 22:07:24 +01:00
parent a15ff8c41f
commit 28812b2391

View File

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