Skip Menu |
 

This queue is for tickets about the Math-Geometry-Planar CPAN distribution.

Report information
The Basics
Id: 128856
Status: new
Priority: 0/
Queue: Math-Geometry-Planar

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.18
Fixed in: (no value)



Subject: Illegal division by zero in centroid() call
Download (untitled) / with headers
text/plain 708b
Here's an example script using centroid() which fails with an error: Illegal division by zero at /opt/perl-5.28.1/lib/site_perl/5.28.1/Math/Geometry/Planar.pm line 3469. (This is with perl 5.28.1 on a debian/jessie system, if this matters) #!/usr/bin/env perl use strict; use warnings; use Math::Geometry::Planar; my $polygon = Math::Geometry::Planar->new; my $points = [[9937,10438], [9888,10322], [9901,10300], [10123,10304], [10151,10372], [10121,10382], [10101,10337], [10047,10334], [10047,10397], [9991,10397], [9991,10419], [9973,10417], [9974,10381], [10032,10378], [10033,10352], [9945,10355], [9929,10365], [9958,10429], [9937,10438]]; $polygon->points($points); $polygon->centroid(); __END__


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.