Interface Interpolator

The interpolator function that returns an interpolated value for the given argument.

interface Interpolator {
    update?(xs: readonly number[], ys: readonly number[]): void;
    (x: number): number;
}
  • Parameters

    • x: number

    Returns number

Methods

Methods

  • Update the interpolation domain. Used if stop colors of the gradient are changed.

    Parameters

    • xs: readonly number[]
    • ys: readonly number[]

    Returns void