Version 1.2.1

CloneZones:
- nameScheme
- indentical
This commit is contained in:
Christian Franz
2023-01-12 16:40:50 +01:00
parent 46afa49c3a
commit 43d598f035
10 changed files with 440 additions and 57 deletions

View File

@@ -691,6 +691,31 @@ dcsCommon.version = "2.8.0"
end
function dcsCommon.bearingFromAtoB(A, B) -- coords in x, z
if not A then
trigger.action.outText("WARNING: no 'A' in bearingFromAtoB", 30)
return 0
end
if not B then
trigger.action.outText("WARNING: no 'A' in bearingFromAtoB", 30)
return 0
end
if not A.x then
trigger.action.outText("WARNING: no 'A.x' (type A =<" .. type(A) .. ">)in bearingFromAtoB", 30)
return 0
end
if not A.y then
trigger.action.outText("WARNING: no 'A.x' (type A =<" .. type(A) .. ">)in bearingFromAtoB", 30)
return 0
end
if not B.x then
trigger.action.outText("WARNING: no 'B.x' (type B =<" .. type(B) .. ">)in bearingFromAtoB", 30)
return 0
end
if not B.y then
trigger.action.outText("WARNING: no 'B.y' (type B =<" .. type(B) .. ">)in bearingFromAtoB", 30)
return 0
end
dx = B.x - A.x
dz = B.z - A.z
bearing = math.atan2(dz, dx) -- in radiants