File size: 482 Bytes
b797337 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import { Interpolant } from '../Interpolant.js';
/**
*
* Interpolant that evaluates to the sample value at the position preceding
* the parameter.
*/
class DiscreteInterpolant extends Interpolant {
constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
super( parameterPositions, sampleValues, sampleSize, resultBuffer );
}
interpolate_( i1 /*, t0, t, t1 */ ) {
return this.copySampleValue_( i1 - 1 );
}
}
export { DiscreteInterpolant };
|