Optimizations for better usage of XS code

This commit is contained in:
Alessandro Ranellucci 2013-08-29 01:36:42 +02:00
parent 9254ff9704
commit 5d6fd7f4d9
22 changed files with 68 additions and 42 deletions

View file

@ -101,10 +101,10 @@ sub fill_surface {
foreach my $path ($collection->chained_path) {
if (@paths) {
# distance between first point of this path and last point of last path
my $distance = $paths[-1][-1]->distance_to($path->[0]);
my $distance = $paths[-1]->last_point->distance_to($path->first_point);
if ($distance <= $m->{hex_width}) {
$paths[-1]->append(@$path);
$paths[-1]->append_polyline($path);
next;
}
}