UNPKG

@drozdik.m/lerp

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