-
Notifications
You must be signed in to change notification settings - Fork 5
interpolate
Subhajit Sahu edited this page May 19, 2020
·
12 revisions
Estimates new values between existing ones. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:]
Similar: [interleave], [intermix], [intersperse], [interpolate].
iterable.interpolate(x, fn);
// x: an iterable
// fn: 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 ]