general-purpose swap macro.
Shear transforms, futzing with some thresholds, and polar/spherical -> rectangular conversions.