Skip to content

Commit

Permalink
fix race condition that produced broken triangulation
Browse files Browse the repository at this point in the history
closes #13
  • Loading branch information
mourner committed Aug 31, 2018
1 parent 3a61ecc commit b1f360c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 24 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ export default class Delaunator {
const ar = a0 + (a + 2) % 3;
const bl = b0 + (b + 2) % 3;

if (b === -1) return ar;

const p0 = triangles[ar];
const pr = triangles[a];
const pl = triangles[al];
Expand Down
Loading

0 comments on commit b1f360c

Please sign in to comment.