Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | 'use strict'; |
| 2 | |
| 3 | // See: http://robertpenner.com/easing/ |
| 4 | |
| 5 | Object.defineProperty(exports, "__esModule", { |
| 6 | value: true |
| 7 | }); |
| 8 | var 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 | |
| 15 | var 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 | |
| 21 | exports.easeInOutQuad = easeInOutQuad; |
| 22 | exports.inOutQuintic = inOutQuintic; |