TITLE: How do we find out angle from $x$ & $y$ coordinates?
QUESTION [8 upvotes]: I found the following sentence.

To find the angle you use the arctangent function like this, angle $=\tan^{-1}\left(\frac{y}{x}\right)$.

But I am curious, is this the only way to know the angle?
In other words, is it possible to find the angle with $\sin\left(\frac{y}{x}\right)$, $\cos\left(\frac{y}{x}\right)$  or $\tan$.. etc?

REPLY [5 votes]: In this recent answer, it is shown that
$$
\theta=2\arctan\left(\vcenter{\frac y{x+\sqrt{x^2+y^2}}}\right)
$$
This formula works for all $x,y$ except on the negative real axis, where $\theta$ goes from just under $\pi$ on top to just above $-\pi$ underneath.