Haramanai #1 It's better to keep the original output of the ATan2 cause you will utomatically know if it's pointing upwards or downwards by signe ( - , + ). This will help you better to find which way (left or right) you have to turn to get at a desired angle.