UNPKG

@drozdik.m/lerp

Version:
7 lines (5 loc) 244 B
import { ILerpFunction } from "./ILerpFunction"; export let Linear: ILerpFunction = function(from: number, to: number, currentFrame: number, totalFrames: number): number { return (to - from) * currentFrame / totalFrames + from; }