I have 2 players in a game (Cod 4). I read X, Y, Z and store them in: eX, eY and eZ for enemy coordinates, and pX, pY and pZ for my player, then I get the Vector for X and Z:
if (eX <= pX and eZ < pZ) is true then
VectorX = pX - eX
VectorZ = pZ - eZ
Then I tried this: Atan (VectorX/VectorZ) * 180.0f / PI (the game uses degrees so I convert from radians), then the number I got divided by 360 but that gives me a crazy float like 5.5343434e-44.
What does this mean, and why does it happen?
Expanding on what KittyL wrote in his/her comment to the question (why do people answer in comments?), atan() has returned a floating point number close to $0$. $5.5343434$e-$44$ means $5.5343434\times10^{-44}$). This is a perfectly fine result if, for example, VectorX is a small positive number and VectorZ is a large positive number.