module VideoAnimationHelpers def ease_in_out(t) t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t end def ease_out_bounce(t) if t < 1/2.75 7.5625 * t * t elsif t < 2/2.75 7.5625 * (t -= 1.5/2.75) * t + 0.75 elsif t < 2.5/2.75 7.5625 * (t -= 2.25/2.75) * t + 0.9375 else 7.5625 * (t -= 2.625/2.75) * t + 0.984375 end end def ease_out_expo(t) t == 1 ? 1 : 1 - (2 ** (-10 * t)) end end