UNPKG

@gamestdio/easing

Version:

Collection of easing equations for JavaScript / TypeScript

10 lines (9 loc) 294 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function backInOut(t) { const s = 1.70158 * 1.525; if ((t *= 2) < 1) return 0.5 * (t * t * ((s + 1) * t - s)); return 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2); } exports.backInOut = backInOut;