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

Package detail

lerp

mattdesl167.9kMIT1.0.3

bare-bones linear interpolation function

linear, interpolation, lerp, interp, smoothstep, mix, anim, animation, animate

readme

lerp

Build Status frozen

In the fashion of small modules and saving keystrokes; this is a bare-bones linear interpolation function. Same as mix in GLSL.

var lerp = require('lerp')

var res = lerp(a, b, t);

Usage

NPM

lerp(start, end, alpha)

Interpolates from start to end using the given alpha.

License

MIT, see LICENSE.md for details.