LinearApproximation

external object LinearApproximation(source)

An InterpolationAlgorithm for performing linear interpolation.

See also

Properties

Link copied to clipboard
external var type: String

Gets the name of this interpolation algorithm.

Functions

Link copied to clipboard
external fun getRequiredDataPoints(degree: Double): Int

Given the desired degree, returns the number of data points required for interpolation. Since linear interpolation can only generate a first degree polynomial, this function always returns 2.

Link copied to clipboard
external fun interpolateOrderZero(x: Double, xTable: ReadonlyArray<JsDouble>, yTable: ReadonlyArray<JsDouble>, yStride: Double, result: ReadonlyArray<JsDouble>? = definedExternally): ReadonlyArray<JsDouble>

Interpolates values using linear approximation.