Interpolant that evaluates to the sample value at the position preceding the parameter.
const interpolant = new LinearInterpolant(new Float32Array( 2 ),new Float32Array( 2 ),1,new Float32Array( 1 ));interpolant.evaluate( 0.5 );
Create a new instance.
array of positions
array of samples
number of samples
buffer to store the interpolation results.
Optional
Evaluate the interpolant at position t.
An array
time
Interpolant that evaluates to the sample value at the position preceding the parameter.
Examples