Correction for angle wraparound when smoothing.