I have the following formula for finding $\theta$ given cartesian form of complex numbers.
$$\theta = \begin{cases} \tan^{-1}(\frac{y}{x}) & x \leq 0 \\ \tan^{-1}(\frac{y}{x}) & x \geq 0 \\ \pm\frac{\pi}{2} & x = 0 \end{cases} $$
My confusion is when $x=0$. How do I tell if my angle is $\frac{\pi}{2}$ or $-\frac{\pi}{2}$
For example, let's say my complex number is $z = -i$
In that case $x=0$, so is the angle $\frac{\pi}{2}$ or $-\frac{\pi}{2}$?