npm.io
1.1.2 • Published 6 years ago

lerpjs

Licence
MIT
Version
1.1.2
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
1

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

Keywords