Skip to content

Commit

Permalink
Merge pull request #52 from Partmedia/frontier/angle
Browse files Browse the repository at this point in the history
Display heading as a number between 0-360
  • Loading branch information
Cheackraze committed Jul 19, 2023
2 parents 96f5305 + 04b47f5 commit e7c769d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Client/Shuttles/UI/ShuttleConsoleWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ protected override void Draw(DrawingHandleScreen handle)
var displayRot = -worldRot.Reduced();

GridPosition.Text = $"{worldPos.X:0.0}, {worldPos.Y:0.0}";
GridOrientation.Text = $"{displayRot.Degrees:0.0}";

// displayRot is between -180 and 180 deg, but aviation people like 0 to 360.
GridOrientation.Text = $"{((displayRot.Degrees+360) % 360):0.0}°";

var gridVelocity = gridBody.LinearVelocity;
gridVelocity = displayRot.RotateVec(gridVelocity);
Expand Down

0 comments on commit e7c769d

Please sign in to comment.