GitHub 6219★

Calculate the linear interpolation between two numbers

JavaScript version

const lerp = (a, b, amount) => (1 - amount) * a + amount * b;

TypeScript version

const lerp = (a: number, b: number, amount: number): number => (1 - amount) * a + amount * b;
Follow me on and to get more useful contents.