Array of numbers (between 0 to 1) which each represent an instant of the interpolation
Array of numbers to interpolate between
How many decimals should the interpolated value have
Array of interpolated numbers at different instances
Generated using TypeDoc
Given an Array of numbers, estimate the resulting number, at a
t
value between 0 to 1Basic interpolation works by scaling
t
from 0 - 1, to some start number and end number, in this case lets use 0 as our start number and 100 as our end number, so, basic interpolation would interpolate between 0 to 100.If we use a
t
of 0.5, the interpolated value between 0 to 100, is 50. batchInterpolateNumber takes it further, by allowing you to interpolate with more than 2 values, it allows for multiple values. E.g. Given an Array of values [0, 100, 0], and at
of 0.5, the interpolated value would become 100.Based on d3.interpolateBasis [https://github.com/d3/d3-interpolate#interpolateBasis], check out the link above for more detail.
Buliding on-top of batchInterpolateNumber,
interpolateNumberBatch
interpolates between numbers, but unlike batchInterpolateNumberinterpolateNumberBatch
uses an Array oft
instances to generate an array of interpolated valuesSource
Source code of
interpolateNumberBatch