web3d / node_modules /three /src /math /interpolants /DiscreteInterpolant.js
julien-c's picture
julien-c HF staff
do not gitignore the builds
6cd9596
raw
history blame contribute delete
625 Bytes
import { Interpolant } from '../Interpolant.js';
/**
*
* Interpolant that evaluates to the sample value at the position preceeding
* the parameter.
*
* @author tschw
*/
function DiscreteInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );
}
DiscreteInterpolant.prototype = Object.assign( Object.create( Interpolant.prototype ), {
constructor: DiscreteInterpolant,
interpolate_: function ( i1 /*, t0, t, t1 */ ) {
return this.copySampleValue_( i1 - 1 );
}
} );
export { DiscreteInterpolant };