Some thing i should know about atant2:
Most content of this article copyed from wikipedia
The purpose of using two arguments instead of one is to gather information on the signs of the inputs in order to return the appropriate quadrant of the computed angle, which is not possible for the single-argument arctangent function.
Atan2 is very useful in determining angle between lines in 2d or 3d space.
The positive winding direction always start from x positive axes (the second parameter) to y positive axes(the first parameter).
So -pi <= atan2 <= pi,
And it 't pretty easy to figure out
-atan2(y, x) = atan2(-y, x)
atan2(y, -x) = Pi - atan2(y, x)