Its been awhile since I've used Acos and Asin to find an angle.
Here is what I am doing as of now
However, this must not be correct cuz the values it is returning are obscure. I do not believe it is even returning the correct radians if it is indeed returning radians instead of degrees. I believe my formula is incorrect.
Let me know if my explanation is poor, or rather if you are unable to follow what I am trying to get at.
Here is what I am doing as of now
JASS:
set mag=SquareRoot((this.xforce*this.xforce)+(this.yforce*this.yforce))
if mag!=0 then
if this.yforce!=0 then
set dir = Acos(((mag*mag)+(this.yforce*this.yforce)-(this.xforce*this.xforce))/(2*mag*this.yforce))
endif
endif
However, this must not be correct cuz the values it is returning are obscure. I do not believe it is even returning the correct radians if it is indeed returning radians instead of degrees. I believe my formula is incorrect.
Let me know if my explanation is poor, or rather if you are unable to follow what I am trying to get at.