UNPKG

@drozdik.m/lerp

Version:
9 lines (8 loc) 399 B
exports.__esModule = true; exports.EaseInOutQuart = function (from, to, currentFrame, totalFrames) { currentFrame /= totalFrames / 2; if (currentFrame < 1) return (to - from) / 2 * currentFrame * currentFrame * currentFrame * currentFrame + from; currentFrame -= 2; return -(to - from) / 2 * (currentFrame * currentFrame * currentFrame * currentFrame - 2) + from; };