From 3acb9d2fe214080db0fa8e4f8af289ec0460c75d Mon Sep 17 00:00:00 2001 From: asvitkine Date: Wed, 20 Sep 2023 21:27:01 -0400 Subject: [PATCH] Show up to 2 decimals for percents in battle calc. (#11978) --- .../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 7d6a92d167d..4832e437b5e 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) {