mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update Utils.lua
This commit is contained in:
parent
386be19b8b
commit
56d7638617
@ -3307,10 +3307,12 @@ end
|
||||
-- @return #number Adjust heading in [0,360).
|
||||
function UTILS.AdjustHeading360(Heading)
|
||||
|
||||
if Heading>=360 then
|
||||
Heading=Heading-360
|
||||
elseif Heading<0 then
|
||||
Heading=Heading+360
|
||||
while Heading>=360 or Heading<0 do
|
||||
if Heading>=360 then
|
||||
Heading=Heading-360
|
||||
elseif Heading<0 then
|
||||
Heading=Heading+360
|
||||
end
|
||||
end
|
||||
|
||||
return Heading
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user