Converting from Radians to Degrees

You want to calculate radians=tan(y/x) first.

Then you can convert it to degrees:

radians = atan(y/x)
degrees = radians * (180.0/3.141592653589793238463)

See the reference here for atan:

On a side note, you also have to take into account what quadrant you are in to get the correct answer (since -y/x is the same number as y/-x)

Leave a Comment