UNPKG

@opensig/opendesign

Version:

13 lines (12 loc) 402 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); function easeInOutCubic(current, start, end, duration) { const elapsed = end - start; let time = current / (duration / 2); if (time < 1) { return elapsed / 2 * time * time * time + start; } time -= 2; return elapsed / 2 * (time * time * time + 2) + start; } exports.easeInOutCubic = easeInOutCubic;