What is the inverse of the function
math.atan2
I use this in Lua where I can get the inverse of math.atan by math.tan
math.atan
math.tan
According this reference:
Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of x being zero.)
So I guess you can use math.tan to invert it also.