The atan2 function does not unwrap anything. It merely produces a four-quadrant theta, with
Consider an initial theta that runs from, say, 0 to 40*pi. The following demo code shows that as a function of theta, the output of atan2 is always between -pi and pi and produces a sawtooth-like result with jumps from -pi to pi. Applying unwrap removes the jumps and produces a continuuous angle so that theta2 runs from 0 to 40*pi and theta2 = theta.
If you plug angles into any trig function there is always the 2pi ambiguity, so theta and theta +- 2*pi*n give the same result. Therefore the unwrapped and not-unwrapped angles give the same result when pluggid into any trig function.
theta2 = unwrap(atan2(y,x));