From 71dd02a4dc7bc49e773f27762d23e7cef41bb713 Mon Sep 17 00:00:00 2001 From: Capkirk123 Date: Sun, 7 Jul 2024 19:07:53 -0400 Subject: [PATCH] Try to round gain before displaying --- src/RealAntennasProject/Tools.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/RealAntennasProject/Tools.cs b/src/RealAntennasProject/Tools.cs index 2ab5172..545875a 100644 --- a/src/RealAntennasProject/Tools.cs +++ b/src/RealAntennasProject/Tools.cs @@ -40,9 +40,11 @@ public static string PrettyPrint(double d) public static string PrettyPrint(List list) { string s = string.Empty; + double roundedGain = 0; foreach (RealAntenna ra in list) { - s += $"{ra.RFBand.name}-Band: {ra.Gain} dBi\n"; + roundedGain = math.Round(ra.Gain, 1); + s += $"{ra.RFBand.name}-Band: {roundedGain} dBi\n"; } return s; }