Subject: | Endless loop in centroid() call |
The following script is trapped in an endless busy loop and also eats memory:
#!/usr/bin/env perl
use strict;
use warnings;
use Math::Geometry::Planar;
my $polygon = Math::Geometry::Planar->new;
my $points = [[9735,12365], [9739,12328], [9731,12327], [9737,12280], [9744,12281], [9745,12272], [9779,12276], [9777,12285], [9787,12286], [9781,12332], [9772,12331], [9768,12369], [9735,12365]];
$polygon->points($points);
$polygon->centroid();
__END__
Probably it's within the while loop in _triangulate_single_polygon