blob: 95da687f64590a14f91209672c4044d56ac63155 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001'use strict';
2
3// See: http://robertpenner.com/easing/
4
5Object.defineProperty(exports, "__esModule", {
6 value: true
7});
8var easeInOutQuad = function easeInOutQuad(t, b, c, d) {
9 t /= d / 2;
10 if (t < 1) return c / 2 * t * t + b;
11 t--;
12 return -c / 2 * (t * (t - 2) - 1) + b;
13};
14
15var inOutQuintic = function inOutQuintic(t, b, c, d) {
16 var ts = (t /= d) * t;
17 var tc = ts * t;
18 return b + c * (6 * tc * ts + -15 * ts * ts + 10 * tc);
19};
20
21exports.easeInOutQuad = easeInOutQuad;
22exports.inOutQuintic = inOutQuintic;