Skip to content

Commit

Permalink
Try to round gain before displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
Capkirk123 committed Jul 7, 2024
1 parent 18a81c2 commit 71dd02a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RealAntennasProject/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ public static string PrettyPrint(double d)
public static string PrettyPrint(List<RealAntenna> 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;
}
Expand Down

0 comments on commit 71dd02a

Please sign in to comment.