mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-17 20:56:08 +00:00
Merge pull request #2489 from FlightControl-Master/master
Update Utils.lua
This commit is contained in:
@@ -4598,6 +4598,18 @@ function UTILS.Vec2toVec3(vec,y)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Converts a Vec3 to a Vec2
|
||||||
|
-- @param vec3 the Vec3 to convert
|
||||||
|
-- @return Vec2 The Vec2 output
|
||||||
|
function UTILS.Vec3toVec2(Vec3)
|
||||||
|
if Vec3 and type(Vec3)=="table" then
|
||||||
|
local Vec2 = {}
|
||||||
|
Vec2.x = Vec3.x or 0
|
||||||
|
Vec2.y = Vec3.z or 0
|
||||||
|
return Vec2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- Get the correction needed for true north in radians
|
--- Get the correction needed for true north in radians
|
||||||
-- @param gPoint The map point vec2 or vec3
|
-- @param gPoint The map point vec2 or vec3
|
||||||
-- @return number correction
|
-- @return number correction
|
||||||
|
|||||||
Reference in New Issue
Block a user