JSPM

  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q68127F
  • License MIT

Estimates new values between existing ones.

Package Exports

  • @extra-array/interpolate

Readme

Estimates new values between existing ones. 📦 😺 🏃 📼 🌔 📜 📰 📘

Similar: interleave, intermix, interpolate, intersperse.

This is part of package extra-array.


array.interpolate(x, fc);
// x:  an array
// fc: combine function (a, b)
const array = require("extra-array");

var x = [1, 2, 3];
array.interpolate(x, (a, b) => (a + b)/2);
// [ 1, 1.5, 2, 2.5, 3 ]