From 7f12bf0d57055203cc88400014250671e10ebd21 Mon Sep 17 00:00:00 2001 From: asvitkine Date: Wed, 20 Sep 2023 21:17:35 -0400 Subject: [PATCH] Show up to 2 decimals for percents in battle calc. --- .../strategy/triplea/odds/calculator/BattleCalculatorPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game-app/game-core/src/main/java/games/strategy/triplea/odds/calculator/BattleCalculatorPanel.java b/game-app/game-core/src/main/java/games/strategy/triplea/odds/calculator/BattleCalculatorPanel.java index 7d6a92d167..4832e437b5 100644 --- a/game-app/game-core/src/main/java/games/strategy/triplea/odds/calculator/BattleCalculatorPanel.java +++ b/game-app/game-core/src/main/java/games/strategy/triplea/odds/calculator/BattleCalculatorPanel.java @@ -677,7 +677,7 @@ private Territory findPotentialBattleSite() { } private static String formatPercentage(final double percentage) { - return new DecimalFormat("#%").format(percentage); + return new DecimalFormat("#%.##").format(percentage); } private static String formatValue(final double value) {