atan2 ⁡ ( y , x ) {\displaystyle \operatorname {atan2} (y,x)} returns a single value θ {\displaystyle \theta } such that − π < θ ≤ π {\displaystyle -\pi <\theta \leq \pi } and, for r = x 2 + y 2 {\textstyle r={\sqrt {x^{2}+y^{2}}}} ,