Well, geometry has finally become of use in my life, too bad I rarely payed attention in that class
So I have a character, lets call him bob. Bob is inside of a 100 x 100 window, the center of bobs body is at (50, 50), hence he is in the middle of the screen.
The mouse position can be put anywhere around bob in this window, and we want to calculate the angle at which the mouse is in relationship 0 - 360 degrees.
Just like a unit circle (yay calc!)
I have been using Math.atan, but it only gives angles -90 - 90, is there a way to calculate these angles in relationship to a horizontal-radian line pointing to the right?
This may expain better: