ixfx
    Preparing search index...

    Function interpolator

    • Returns a function that interpolates along line, returning a Point.

      const i = interpolator(a: {x:0,y:0}, b:{x:100, y:100});
      i(0.5); // Returns point 50% between a and b.

      Parameters

      • line: Line

        Line to interpolate along

      • allowOverflow: boolean = false

        If true interpolation amount can exceed 0..1, extending the line.

      Returns (amount: number) => Point