ixfx
    Preparing search index...
    • Yields every integer point along line.

      Parameters

      Returns Generator<Point>

      const l = { a: {x: 0, y: 0}, b: {x: 100, y: 100} };
      for (const p of Lines.pointsOf(l)) {
      // Do something with point `p`...
      }

      Some precision is lost as start and end point is also returned as an integer.

      Uses Bresenham's line algorithm