Skip to content

Commit

Permalink
saves 50 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Jan 19, 2020
1 parent e3c3d30 commit 1e279e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/delaunay.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ export default class Delaunay {
return new Voronoi(this, bounds);
}
*neighbors(i) {
const {inedges, hull, _hullIndex, halfedges, triangles} = this;
const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this;

// degenerate case with several collinear points
if (this.collinear) {
const l = this.collinear.indexOf(i);
if (l > 0) yield this.collinear[l - 1];
if (l < this.collinear.length - 1) yield this.collinear[l + 1];
if (collinear) {
const l = collinear.indexOf(i);
if (l > 0) yield collinear[l - 1];
if (l < collinear.length - 1) yield collinear[l + 1];
return;
}

Expand Down

0 comments on commit 1e279e1

Please sign in to comment.