UNPKG

@drozdik.m/lerp

Version:
6 lines (5 loc) 272 B
import { ILerpFunction } from "./ILerpFunction"; export let EaseInExpo : ILerpFunction = function (from: number, to: number, currentFrame: number, totalFrames: number): number { return (to - from) * Math.pow(2, 10 * (currentFrame / totalFrames - 1)) + from; }