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:
@@ -3307,10 +3307,12 @@ end
|
|||||||
-- @return #number Adjust heading in [0,360).
|
-- @return #number Adjust heading in [0,360).
|
||||||
function UTILS.AdjustHeading360(Heading)
|
function UTILS.AdjustHeading360(Heading)
|
||||||
|
|
||||||
if Heading>=360 then
|
while Heading>=360 or Heading<0 do
|
||||||
Heading=Heading-360
|
if Heading>=360 then
|
||||||
elseif Heading<0 then
|
Heading=Heading-360
|
||||||
Heading=Heading+360
|
elseif Heading<0 then
|
||||||
|
Heading=Heading+360
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return Heading
|
return Heading
|
||||||
|
|||||||
Reference in New Issue
Block a user