UNPKG

283 BJavaScriptView Raw
1// eslint-disable-next-line import/prefer-default-export
2export function easeInOutCubic(t, b, c, d) {
3 var cc = c - b;
4 t /= d / 2;
5
6 if (t < 1) {
7 return cc / 2 * t * t * t + b;
8 } // eslint-disable-next-line no-return-assign
9
10
11 return cc / 2 * ((t -= 2) * t * t + 2) + b;
12}
\No newline at end of file