I wasn't sure what board this belonged on (if any), but since it pertains to the creation of my game I put it here.

For those of you who are familiar with the following code:

Basically, this increases the X/Y in the direction that the 'thing' is facing (angle-wise).Code:x += cos(angle)*speed; y += -sin(angle)*speed;

What I need to do is the reverse of this. After I get the x/y values, how can I determine the angle?

Thanks!