UNPKG

@gamestdio/easing

Version:

Collection of easing equations for JavaScript / TypeScript

11 lines (10 loc) 315 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function expoInOut(t) { return (t === 0.0 || t === 1.0) ? t : t < 0.5 ? +0.5 * Math.pow(2.0, (20.0 * t) - 10.0) : -0.5 * Math.pow(2.0, 10.0 - (t * 20.0)) + 1.0; } exports.expoInOut = expoInOut;