Some compile-time sanity checking and version macros.
Enforce ranges for min and max. First normalize inputs to (-M_PI,M_PI], then enforce ranges.