# Convert atan2 value to standard 360-degree-system value [duplicate]

Lets say I'm using atan2 to get the angle between two vectors.

atan2 gives a value in radians. I convert it to degrees using a built in function in Java. This gives me a value between 0 and 180 degrees or between 0 and -180 (the nature of atan2).

Is there a way to convert the value received with this function (after it's been converted to degrees), to the standard 360-degree-system, without changing the angle - only the way it's written? It would make it easier for me to work with.

Thanks

• Four atan2 questions in a row; you might want to head to chat or a similar discussion site and figure out what you don't understand about this. – MichaelHouse Feb 1 '14 at 7:12
• Just do this -> angle = (angle + 720) % 360; – wolfdawn Feb 1 '14 at 9:08