Inverse of math.atan2?

前端 未结 4 856
面向向阳花
面向向阳花 2021-02-07 06:46

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

4条回答
  •  不要未来只要你来
    2021-02-07 06:57

    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.

提交回复
热议问题