Joystick degrees

atan2(y,x) (NOTE the order of the x and y here) returns the value of the angle in radians from -pi to pi (which in degrees is -180 to 180). To convert that to 0-360 you convert radians to degrees and then just add 180. The main thing you have to concern yourself with is how that relates to the way that you have oriented the joystick. But that is a simple bit of math.

BTW. Post your code (in code tags).
Pete