def rotation_to_apply(self, only90s=False, no_mirror=False):
        """Check and interpret rotation.

        Returns a truth value as to whether to mirror, and a floating point
        number 0 <= angle < 360 (degrees).
        """
        rotation = self.request.rotation_deg
        if (no_mirror and self.request.rotation_mirror):
            raise IIIFError(code=501, parameter="rotation",
                            text="This implementation does not support mirroring.")
        if (only90s and (rotation != 0.0 and rotation != 90.0 and
                         rotation != 180.0 and rotation != 270.0)):
            raise IIIFError(code=501, parameter="rotation",
                            text="This implementation supports only 0,90,180,270 degree rotations.")
        return(self.request.rotation_mirror, rotation)
Check and interpret rotation.

        Returns a truth value as to whether to mirror, and a floating point
        number 0 <= angle < 360 (degrees).