@classmethod
def ease_in_out(cls, progress=0):
    """Method to calculate transition for easeInOut display.

        Ease in and out is more complex:
            In the first half of the time the transition is applied normally,
            in the second half it is applied reverse.
        """
    if progress <= 0.5:
        return cls.pos(2 * progress) / 2
    else:
        return 2 - cls.pos(2 * (1 - progress)) / 2
