The fold_spherical_angles() performs a second wrapping in case the angles shift out of the window.
Window size checks have also been added.
Authored by: bugman 2010-02-25
Parent: [r10942]
Child: [r10944]