twoPi is equal 6.28 and is correct This problem is not related to this
The problem is the response of atan2 is not correct