Warcraft III resources & community, 2003–2006 · archived

Add2DVectorsGetVelocity

not rated
Submitted by KaTTaNaPhysics0 downloads
Returns the velocity of two added vectors.
dir1 and dir2 must be in degrees.

Source

function Add2DVectorsGetVelocity 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 SquareRoot(x*x + y*y)
endfunction

Comments

0

No comments.