Skip to content

Commit

Permalink
Merge branch 'main' of github.com:d3/d3-delaunay into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jun 4, 2021
2 parents bdedd3e + 0b51543 commit 6b6ada0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/voronoi.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,8 @@ export default class Voronoi {
case 0b1001: e0 = 0b0001; continue; // bottom-left
case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left
}

// Implicit out of bounds checking.
// P[j] or P[j+1] may become undefined and the conditional statement will be
// executed.
// Note: this implicitly checks for out of bounds: if P[j] or P[j+1] are
// undefined, the conditional statement will be executed.
if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) {
P.splice(j, 0, x, y), j += 2;
}
Expand Down

0 comments on commit 6b6ada0

Please sign in to comment.