Function getInterpolatedValue

  • Parameters

    • axis: "y" | "x"

      Axis on which passed value lays and for which find interpolation interval.

    • value: number

      Value for passed axis. It should lay inside of value range and can be located anywhere, not just exactly on passed values.

    • values: [number, number][]

      Value range for both axes.

    Returns number

    Computed value for second axis based on ratio distance inside found interval on first one or undefined if interval cannot be found.

    Description

    Function searchs for interval between two values in which passed value lays and returns computed value for second axis based on ratio distance on first one.

Generated using TypeDoc