Optimization: use Boost.Geometry for point in polygon

This commit is contained in:
Alessandro Ranellucci 2013-06-20 18:48:11 +02:00
parent f7be746599
commit b414c50b68
2 changed files with 5 additions and 7 deletions

View file

@ -65,7 +65,7 @@ sub point_on_segment {
sub encloses_point {
my $self = shift;
my ($point) = @_;
return point_in_polygon($point, $self);
return Boost::Geometry::Utils::point_covered_by_polygon($point, [$self]);
}
sub area {