Does anyone know the formula that's going on behind this function: angle(x1, y1 , x2, y2) ?
I tried using the (Distance formula to get the hypotenuse) ....
I also used the trigonometric formulas SOHCAHTOA to get each sides and angles...
I also used cos(a/h) * 180/pi to get the angle but it seems wrong.
I also used this formula cos = { u1*v1 + u2*v2 / (sqrt[u1^2+v2^2])(sqrt[v1^2+v2^2]) }
but no luck...
Anything i'm missing...?
Thanks.
Update: Edit:
Lol. My formula was correct from the beginning, i just forgot to add + 90 degrees since i was using a tiledbackground.