
I am puzzled with which one is right.If my work is wrong.please give me a right explanation in detail.

I am puzzled with which one is right.If my work is wrong.please give me a right explanation in detail.
The problem with recovering the polar angle $\theta$ from the equation $\tan \theta=y/x$ is that the solution is not unique modulo $2\pi$: both $\theta$ and $\theta+\pi$ have the same tangent (as Glen O wrote). Programmers got so fed up with this difficulty that they invented a new function atan2, which takes both $y$ and $x$ as arguments and gives $\theta=\mathrm{atan2}\,(y,x)$, taking in to account the signs of both $y$ and $x$.
But people can take the signs of $x,y$ into account as well. Here the real part of $1-z$ is positive (unless $z=1$, when the argument of $1-z$ is undefined). Therefore, the argument of $1-z$ lies in $(-\pi/2,\pi/2)$, up to integer multiples of $2\pi$. If $t$ is in the range $(0,2\pi)$, then $(t-\pi)/2$ is in $(-\pi/2,\pi/2)$, so this is the value we should take.
But if $t$ was in the range $(2\pi,4\pi)$, then $(\pi+t)/2$ would be the correct answer.