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.