UNPKG

@drozdik.m/lerp

Version:
5 lines (4 loc) 198 B
exports.__esModule = true; exports.EaseInOutSine = function (from, to, currentFrame, totalFrames) { return -(to - from) / 2 * (Math.cos(Math.PI * currentFrame / totalFrames) - 1) + from; };