summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2014-03-03 08:34:43 +0000
committerKHobbits <rob@khobbits.co.uk>2014-03-03 08:34:43 +0000
commitb38485dce055e0a0bab4b52c88ceca0dcb35b2b9 (patch)
treef5c8db7d748c1af5edc4413dfd48848c4ff8ff38
parent9bb9102c6a0a461138752bd5b96e3f0e1e843286 (diff)
downloadEssentials-b38485dce055e0a0bab4b52c88ceca0dcb35b2b9.tar
Essentials-b38485dce055e0a0bab4b52c88ceca0dcb35b2b9.tar.gz
Essentials-b38485dce055e0a0bab4b52c88ceca0dcb35b2b9.tar.lz
Essentials-b38485dce055e0a0bab4b52c88ceca0dcb35b2b9.tar.xz
Essentials-b38485dce055e0a0bab4b52c88ceca0dcb35b2b9.zip
Round to gc output to 2 dp.
-rw-r--r--Essentials/src/com/earth2me/essentials/utils/NumberUtil.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java b/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java
index c59461049..2655c111a 100644
--- a/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java
+++ b/Essentials/src/com/earth2me/essentials/utils/NumberUtil.java
@@ -11,7 +11,7 @@ import net.ess3.api.IEssentials;
public class NumberUtil
{
- static DecimalFormat threeDPlaces = new DecimalFormat("#,###.###");
+ static DecimalFormat twoDPlaces = new DecimalFormat("#,###.##");
static DecimalFormat currencyFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US));
public static String shortCurrency(final BigDecimal value, final IEssentials ess)
@@ -21,8 +21,8 @@ public class NumberUtil
public static String formatDouble(final double value)
{
- threeDPlaces.setRoundingMode(RoundingMode.HALF_UP);
- return threeDPlaces.format(value);
+ twoDPlaces.setRoundingMode(RoundingMode.HALF_UP);
+ return twoDPlaces.format(value);
}
public static String formatAsCurrency(final BigDecimal value)