Algorithm-RectanglesContainingDot
view release on metacpan or search on metacpan
lib/Algorithm/RectanglesContainingDot.pm view on Meta::CPAN
package
Algorithm::RectanglesContainingDot::Perl;
our $MIN_DIV = 8;
sub new {
my $class = shift;
my $self = { rects => [],
names => [] };
bless $self, $class;
}
sub _reset { delete shift->{div} }
sub add_rectangle {
my ($self, $name, $x0, $y0, $x1, $y1) = @_;
($x0, $x1) = ($x1, $x0) if $x0 > $x1;
($y0, $y1) = ($y1, $y0) if $y0 > $y1;
( run in 0.897 second using v1.01-cache-2.11-cpan-de7293f3b23 )