determining if a complex number is a root of unity

How would you determine if $a+ib$ is a $n$th root of unity for some unknown $n$? Obviously the modulus of $a+ib$ must be $1$. But you also need to determine if the $a+ib$ is located at the vertex of a regular polygon. Does that mean checking if the polar angle is rational?

-

Yes, a complex number is a root of unity if and only if its modulus is 1 and its argument in polar form is a rational multiple of $\pi$.