Skip to content

Commit b0e1655

Browse files
committed
Round to gc output to 2 dp.
1 parent 470f4c1 commit b0e1655

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Essentials/src/com/earth2me/essentials/utils/NumberUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class NumberUtil
1313
{
14-
static DecimalFormat threeDPlaces = new DecimalFormat("#,###.###");
14+
static DecimalFormat twoDPlaces = new DecimalFormat("#,###.##");
1515
static DecimalFormat currencyFormat = new DecimalFormat("#0.00", DecimalFormatSymbols.getInstance(Locale.US));
1616

1717
public static String shortCurrency(final BigDecimal value, final IEssentials ess)
@@ -21,8 +21,8 @@ public static String shortCurrency(final BigDecimal value, final IEssentials ess
2121

2222
public static String formatDouble(final double value)
2323
{
24-
threeDPlaces.setRoundingMode(RoundingMode.HALF_UP);
25-
return threeDPlaces.format(value);
24+
twoDPlaces.setRoundingMode(RoundingMode.HALF_UP);
25+
return twoDPlaces.format(value);
2626
}
2727

2828
public static String formatAsCurrency(final BigDecimal value)

0 commit comments

Comments
 (0)