mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
New +Line::intersection_infinite() method
This commit is contained in:
@@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 39;
|
||||
use Test::More tests => 40;
|
||||
|
||||
use constant PI => 4 * atan2(1, 1);
|
||||
use constant EPSILON => 1E-4;
|
||||
@@ -71,4 +71,11 @@ foreach my $base_angle (0, PI/4, PI/2, PI) {
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
my $a = Slic3r::Line->new([100, 0], [200, 0]);
|
||||
my $b = Slic3r::Line->new([300, 300], [300, 100]);
|
||||
my $r = $a->intersection_infinite($b);
|
||||
is_deeply $r->pp, [300, 0], 'intersection_infinite';
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
Reference in New Issue
Block a user