lerpjs
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

lerp.js npm version

The method of linear interpolation (lerp) to easing animations.

Example

import lerp from 'lerpjs';
 
/**
 * @param {number} x - first value
 * @param {number} y - second value
 * @param {number} a - amount to interpolate between x and y
 * @return {number} 
 */
lerp(0, 100, 0.2); // => 20

License

MIT | Przemysław Tyczyński

Package Sidebar

Install

npm i lerpjs

Weekly Downloads

92

Version

1.1.2

License

MIT

Unpacked Size

2.96 kB

Total Files

6

Last publish

Collaborators

  • tyczynski