Question: 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`.  

But I am lost here.

**EDIT**

OK, let me give you more details.

I needed to calculate angle between 2 points (x1,y1) and (x2,y2) and I did,

```
local dy = y1-y2 
local dx = x1-x2
local angle = atan2(dy,dx)* 180 / pi

```

Now if I have the angle, is it possible to get back dy and dx?

Answer: 
Apparently, something like this will help:

```
x = cos(theta)
y = sin(theta) 

```

Simple Google search threw this up, and the guy who asked the question said it solved it.
As atan2 works as tan-1, so the inverse could be tan, taking into consideration conversion between radian and degree