if mu < -1.0 or mu > 1.0:
        raise ValueError(
            "rotate: mu = cos(theta) = {} is not between -1 and +1".format(mu))