Given an Array of numbers, estimate the resulting number, at a
t value between 0 to 1
Basic 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.
interpolateNumber 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 a
t 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.
Source code of
A number between 0 to 1
Array of numbers to interpolate between
How many decimals should the interpolated value have
Interpolated number at instant
Generated using TypeDoc