# unlerp

> opposite of lerp; get normalized range between two bounds

Latest version **1.0.1** (published 2014-09-09) · MIT license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2014-09-09 |
| First published | 2014-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | gl, glsl, math, lerp, linear, interpolation, unlerp, norm, normalize, normalise, normalized, range, vector |

## Links

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

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-09-09
- 1.0.0 — 2014-09-09

## README

[![browser support](https://ci.testling.com/mattdesl/unlerp.png)](https://ci.testling.com/mattdesl/unlerp)

# unlerp

[![frozen](http://badges.github.io/stability-badges/dist/frozen.svg)](http://github.com/badges/stability-badges)

Opposite of [lerp](https://www.npmjs.org/package/lerp); gets the range between a lower and upper bound. 

```js
var range = require('unlerp')

//result is typically between 0.0 and 1.0
var result = range(0, 50, 25) //=> 0.5

//if you want to saturate to 0.0 - 1.0
result = require('clamp')(result, 0, 1)
```

The result is not clamped. 

## Usage

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

### ```range(min, max, value)```

Produces the normalized range of `value` between two bounds. Equivalent to:

```(value - min) / (max - min)```

## License

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

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