Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

lerpjs

tyczynski257MIT1.1.2TypeScript support: included

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

lerp, linear-interpolation, animation, animations, easing, easing-functions

readme

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