interpolate-arrays

1.0.4 • Public • Published

interpolate-arrays

stable

Linear interpolation between multiple arrays

var interpolateArrays = require('interpolate-arrays')

var red   = [255, 0, 0]
var green = [0, 255, 0]
var blue  = [0, 0, 255]

var yellow = interpolateArrays([red, green, blue], 0.25); //-> [ 127.5, 127.5, 0 ]

Usage

NPM

interpolateArrays(arraysList, t[, out])

Linearly interpolates between all arrays in the arraysList using the t component. Returns an interpolated array optionally reusing opt array to avoid allocation.

License

MIT, see LICENSE.md for details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    33
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    33
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0

Package Sidebar

Install

npm i interpolate-arrays

Weekly Downloads

33

Version

1.0.4

License

MIT

Unpacked Size

3.32 kB

Total Files

4

Last publish

Collaborators

  • vorg