Skip to content

Commit

Permalink
Use lines iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
urschrei committed Sep 10, 2017
1 parent c5cbfd8 commit cb0e192
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/algorithm/contains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ where
{
fn contains(&self, poly: &Polygon<T>) -> bool {
// decompose poly's exterior ring into Lines, and check each for containment
poly.exterior.0.windows(2).all(|line| {
self.contains(&Line::new(line[0], line[1]))
})
poly.exterior.lines().all(|line| self.contains(&line))
}
}

Expand Down

0 comments on commit cb0e192

Please sign in to comment.