Skip to content

Commit

Permalink
Merge pull request #1207 from RobWalt/triangulate-spade-optimization
Browse files Browse the repository at this point in the history
triangulate-spade: small optimization, potentially up to a factor of 1/2
  • Loading branch information
michaelkirk authored Aug 8, 2024
2 parents cce1897 + 4db5573 commit 23dd26c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions geo/src/algorithm/triangulate_spade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ fn iter_line_pairs<T: SpadeTriangulationFloat>(
lines
.iter()
.enumerate()
.skip(idx0 + 1)
.filter(move |(idx1, line1)| *idx1 != idx0 && line0 != *line1)
.map(move |(idx1, line1)| [(idx0, line0), (idx1, line1)])
})
Expand Down

0 comments on commit 23dd26c

Please sign in to comment.