Interpolant that evaluates to the sample value at the position preceding the parameter.

Examples

const interpolant = new DiscreteInterpolant(
new Float32Array( 2 ),
new Float32Array( 2 ),
1,
new Float32Array( 1 )
);

interpolant.evaluate( 0.5 );

Hierarchy

Constructors

  • new DiscreteInterpolant(parameterPositions: any, sampleValues: any, sampleSize: any, resultBuffer: any): DiscreteInterpolant
  • Create a new instance.

    Parameters

    • parameterPositions: any

      array of positions

    • sampleValues: any

      array of samples

    • sampleSize: any

      number of samples

    • resultBuffer: any

      buffer to store the interpolation results.

    Returns DiscreteInterpolant

Properties

DefaultSettings_: unknown
_cachedIndex: number
parameterPositions: any[]
resultBuffer?: any[]
sampleValues: any[]
settings: unknown
valueSize: number

Methods

  • copySampleValue_(index: number): any[]
  • evaluate(t: number): any[]
  • Evaluate the interpolant at position t.

    Returns

    An array

    Parameters

    • t: number

      time

    Returns any[]

  • getSettings_(): unknown
  • interpolate_(i1: number): number[]
  • intervalChanged_(i1: number, t0: number, t1: number): void