Skip to content

Commit

Permalink
Fixes #8 - panics index out of bounds (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreesteve committed Jan 9, 2021
1 parent 82ddbdb commit 271ed22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl Triangulation {

/// The number of triangles in the triangulation.
pub fn len(&self) -> usize {
(self.triangles.len() / 3)
self.triangles.len() / 3
}

fn add_triangle(
Expand Down Expand Up @@ -233,7 +233,7 @@ impl Triangulation {
hull.tri[e] = a;
break;
}
e = hull.next[e];
e = hull.prev[e];
if e == hull.start {
break;
}
Expand Down

0 comments on commit 271ed22

Please sign in to comment.