Add2DVectorsGetDirection
not ratedReturns the direction of two added vectors.
dir1 and dir2 must be in degrees. The returned angle is in degrees.
dir1 and dir2 must be in degrees. The returned angle is in degrees.
function Add2DVectorsGetDirection takes real v1, real dir1, real v2, real dir2 returns real
local real x = CosBJ(dir1) * v1 + CosBJ(dir2) * v2
local real y = SinBJ(dir1) * v1 + SinBJ(dir2) * v2
return Atan2BJ(y, x)
endfunctionNo comments.