This brings the angin into the \([-pi pi]\) interval.
angin
angout = npi2pi(angin)
See also
ZERO to 2PI