Class CubicInterpolant

Fast and simple cubic spline interpolant.

It was derived from a Hermitian construction setting the first derivative at each sample position to the linear slope between neighboring positions over their parameter interval.

Examples

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

interpolant.evaluate( 0.5 );

Hierarchy

Constructors

Properties

DefaultSettings_: unknown
_cachedIndex: number
_offsetNext: number
_offsetPrev: number
_weightNext: number
_weightPrev: number
parameterPositions: any[]
resultBuffer?: any[]
sampleValues: any[]
settings: unknown
valueSize: number

Methods

  • Evaluate the interpolant at position t.

    Returns

    An array

    Parameters

    • t: number

      time

    Returns any[]