[Spell] Parabola/Arc Equation

Status
Not open for further replies.
I don't know what exactly you are looking for, but this is a function I made to use in my spells which require some parabola. It takes dist, which is the (x)distance between roots, height which is the max height of the parabola, and x value, and returns z value.

If you use this function for a missile, just give it the distance that the missile has travelled as x-value, and set the height of a missile to return value.

JASS:
function Parabola takes real dist, real height, real x returns real
    local real a = 4*height/dist
    return a*x*(-x/(dist)+1)
endfunction
 
Status
Not open for further replies.
Back
Top