Skip to content

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

License

Notifications You must be signed in to change notification settings

tyczynski/lerp.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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