Implement generalized RotateAxis functions