npm.io
2.6.53 • Published 6 years ago

@extra-array/get-lerp.min

Licence
MIT
Version
2.6.53
Deps
0
Size
6 kB
Vulns
0
Weekly
0
Stars
17

Gets value at fractional index.

Alternatives: one, all, fractional.
This is part of package extra-array.

This is browserified, minified version of @extra-array/get-lerp.
It is exported as global variable array_getLerp.
CDN: unpkg, jsDelivr.

array.getLerp(x, f);
// x: an array
// f: fractional index 0->1
const array = require('extra-array');

var x = [2, 4, 6, 8];
array.getLerp(x, 0.3);
// 4

array.getLerp(x, 0.9);
// 8

references

Keywords