Skip to content

Commit

Permalink
Corrected bearing display for 1000m and longer
Browse files Browse the repository at this point in the history
  • Loading branch information
okopanja committed May 18, 2024
1 parent 773f323 commit a0db253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SharkPlanner/UI/CrosshairWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function CrosshairWindow:updateDistanceFromLast(position)
local distance = position:getDistanceFrom(coordinateData.wayPoints[#coordinateData.wayPoints])
local bearingTo = position:getBearingTo(coordinateData.wayPoints[#coordinateData.wayPoints])
if distance > 1000 then
self.DistanceFromLast:setText(string.format("%.3f km", distance / 1000)..", : "..string.format("%.0f°", bearingTo))
self.DistanceFromLast:setText(string.format("%.3f km", distance / 1000)..", "..string.format("%.0f°", bearingTo))
else
self.DistanceFromLast:setText(string.format("%.1f m", distance)..", "..string.format("%.0f°", bearingTo))
end
Expand Down

0 comments on commit a0db253

Please sign in to comment.