Hi, I am currently developing a robot with the Wii nunchuck and I am trying to find a way to deduce the angle in degree that forms my x and y value with the center of the joystick. I though of a way using the atan() method but It will only work for angle bigger than 45 degree (since it works with the Pythagorean theorem and the triangle whose 3 angle must be equal 180).

So let's say i have my coord ( 28, 5 ) , I want to be able to find what angle it forms from the point 0,0, clockwise... where point (1,0) would be 0 , (1,1) would be 45, (0,1) would be 90 and so on...

I am really looking forward to your answers...

Thanks a lot !!