Ported ExPolygon->area()

This commit is contained in:
Alessandro Ranellucci 2013-08-26 22:50:26 +02:00
parent 792fcba7be
commit 706851f836
7 changed files with 19 additions and 12 deletions

View file

@ -4,7 +4,7 @@ use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 17;
use Test::More tests => 18;
use constant PI => 4 * atan2(1, 1);
@ -40,6 +40,8 @@ is_deeply $expolygon->clone->pp, [$square, $hole_in_square], 'clone';
# The following tests implicitely check that modifying clones
# does not modify the original one.
is $expolygon->area, 100*100-20*20, 'area';
{
my $expolygon2 = $expolygon->clone;
$expolygon2->scale(2.5);