I have edited my question since I clearly wasn't communicating well what I was looking for.
I am given $\theta$ such that $e^{i\theta}$ is a root of unity. We require $$\theta=q\pi,\quad q\in\mathbb{Q}.$$ Clearly, $\theta$ can't be rational.
Given irrational $\theta$, how does one check if $\theta/\pi$ is rational/irrational?
So, I want to know what are methodology one takes to figure out if $\theta/\pi$ is rational. This post appears to give an example of this, but I don't know what rings and Gaussian integers are. Perhaps the method can be explained in simpler terms?
Edit: @TedShifrin asks: "how precisely are you given $\theta$?". I am considering a function that has a parameter $q$. For $q$ that are roots of unity, this function isn't well defined. I was hoping there was a general method of determining if a particular parameter $q$ is a root of unity. I can accept that general methods don't exist. If this is the case, I would of course settle for less general ones, like those used in the link above; I simply don't understand what the method they used was. But I don't have a particular $\theta$ to give you; I would like to learn which classes of $\theta$ can we determine one way or the other.