Skip to content

Commit

Permalink
bugfix large numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
my-th-os committed Oct 29, 2024
1 parent 3627712 commit 7803447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static string GetGpsString(string name, string x, string y, string z, str

public static string GetGpsString(string name, float x, float y, float z, string color)
{
return GetGpsString(name, x.ToString(NumberFormat), y.ToString(NumberFormat), z.ToString(NumberFormat), color);
return GetGpsString(name, x.ToString("0.##", NumberFormat), y.ToString("0.##", NumberFormat), z.ToString("0.##", NumberFormat), color);
}

public static string GetGpsString(string name, Vector3 v, string color)
Expand Down
6 changes: 3 additions & 3 deletions MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ private void Gps_Changed(object sender, Gps gps)
SetTextBox(sender, tbGPS, gps.ToString());

SetTextBox(sender, tbName, gps.Name);
SetTextBox(sender, tbX, gps.X.ToString(Gps.NumberFormat));
SetTextBox(sender, tbY, gps.Y.ToString(Gps.NumberFormat));
SetTextBox(sender, tbZ, gps.Z.ToString(Gps.NumberFormat));
SetTextBox(sender, tbX, gps.X.ToString("0.##", Gps.NumberFormat));
SetTextBox(sender, tbY, gps.Y.ToString("0.##", Gps.NumberFormat));
SetTextBox(sender, tbZ, gps.Z.ToString("0.##", Gps.NumberFormat));
SetTextBox(sender, tbColor, gps.Color);
try
{
Expand Down

0 comments on commit 7803447

Please sign in to comment.