# lerp

> bare-bones linear interpolation function

Latest version **1.0.3** (published 2015-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install lerp
pnpm add lerp
yarn add lerp
bun add lerp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-01-16 |
| First published | 2014-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 104 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | linear, interpolation, lerp, interp, smoothstep, mix, anim, animation, animate |

## Links

- npm: https://www.npmjs.com/package/lerp
- Repository: https://github.com/mattdesl/lerp
- Issues: https://github.com/mattdesl/lerp/issues
- npm.io page: https://npm.io/package/lerp

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-01-16
- 1.0.2 — 2015-01-16
- 1.0.1 — 2015-01-16
- 1.0.0 — 2014-08-27

## README

# lerp

[![Build Status](https://travis-ci.org/mattdesl/lerp.svg?branch=master)](https://travis-ci.org/mattdesl/lerp) [![frozen](http://badges.github.io/stability-badges/dist/frozen.svg)](http://github.com/badges/stability-badges)

In the fashion of small modules and saving keystrokes; this is a bare-bones [linear interpolation](http://en.wikipedia.org/wiki/Linear_interpolation) function. Same as `mix` in GLSL.

```js
var lerp = require('lerp')

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

## Usage

[![NPM](https://nodei.co/npm/lerp.png)](https://nodei.co/npm/lerp/)

```lerp(start, end, alpha)```

Interpolates from start to end using the given alpha.

## License

MIT, see [LICENSE.md](http://github.com/mattdesl/lerp/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/lerp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
