tyczynski / lerp.js

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

Home Page:https://www.npmjs.com/package/lerpjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

https://www.npmjs.com/package/lerpjs

License:MIT License


Languages

Language:JavaScript 100.0%