the angle the circle pad is pointing is given by:
STICK OUT SX#,SY#
ANGLE#=ATAN(SY#,SX#)
the #s after the variable names means they're realtypes. depending on your code they may or may not be there, it's just how I write it. Keep in mind Y comes first in ATAN. Angle is returned in RADIANS not degrees. 0° is stick pointing left, 90° is up, and so on.
Like Alex says, angle is returned in radian with his method.
If you want to get angle in degree, write "DEG(ATAN(SY#,SX#))" instead of "ATAN(SY#,SX#)".
Angle is 0deg when stick is pointing right.
The maximum (minimum) angle is +180deg (-180deg) if you turn stick counterclockwise (clockwise) from 0deg position.