![]() |
Re: Angle from X,Y
It was a joke. The prize: Absolutely nothing!
Basically, I'm asking if anyone knows why you would want it on the controller. |
Atan Function
Here is my Arc Tangent code:
Code:
#define ATAN_COUNT 64[edit]that chould be ATAN_COUNT - 1 not ATAN_COUNT + 1 at line 19[/edit] |
Re: Angle from X,Y
hmmm you can also use vectors, and find the angle with the formula (u * v)/(|u||v|) (the dot product of u and v divided by the product of the magnitudes). This is useful if you are already using vectors, which are probably better suited for motion and such anyways.
|
Re: Angle from X,Y
Quote:
The result of that equation gives you the cos of the angle between the vectors. That is cos(x). You would still need to use an inverse trig function to find the angle (x). I'm going to have to go ahead and give you -15 points for that one. o_O -Daniel |
| All times are GMT -5. The time now is 13:43. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi