ixfx
    Preparing search index...

    Function intersections

    • Yields the intersecting points from a to b against a set of lines.

      const a = { x: 0, y: 0 };
      const b = { x: 640, y: 320 };
      for (const point of G.Rays.intersections(a,b, lines)) {
      // Do something with { x,, y }
      }

      Results are a RaycastHit, consisting of x,y for coordinates, d for relative distance of point from a, and line which is the index of the line.

      Parameters

      Returns Generator<RaycastHit>