Branch Coverage

blib/lib/Math/Polygon/Calc.pm
Criterion Covered Total %
branch 73 106 68.8


line true false branch
79 0 11 unless &polygon_is_closed(@_)
92 0 4 &polygon_is_clockwise(@_) ? :
97 0 0 &polygon_is_clockwise(@_) ? :
115 0 29 if @_ <= 1
117 29 0 if $ring
125 57 24 if $_[$i][0] - $xmin > $dmin_sq
128 8 16 if ($d_sq < $dmin_sq)
134 21 0 $ring ? :
8 0 $ring ? :
21 8 $rot == 0 ? :
139 5 10 ref $_[0] eq 'HASH' ? :
140 0 15 unless @_
142 3 12 exists $opts{'remove_spikes'} ? :
145 2 13 if @res < 4
150 0 152 if @res < 3
164 47 105 if ($despike and @res >= 2)
166 4 43 if ($res[1][0] == $x and $res[1][1] == $y)
172 0 0 if ($y == $res[0][1] and $y == $res[1][1] and $res[0][0] < $x && $x < $res[1][0] || $res[0][0] > $x && $x > $res[1][0])
179 0 2 if ($x == $res[0][0] and $x == $res[1][0] and $res[0][1] < $y && $y < $res[1][1] || $res[0][1] > $y && $y > $res[1][1])
187 4 7 if (@res >= 2 and $res[0][0] == $x and $res[1][0] == $x and $y < $res[0][1] && $res[0][1] < $res[1][1] || $y > $res[0][1] && $res[0][1] > $res[1][1])
194 2 7 if (@res >= 2 and $res[0][1] == $y and $res[1][1] == $y and $x < $res[0][0] && $res[0][0] < $res[1][0] || $x > $res[0][0] && $res[0][0] > $res[1][0])
202 2 3 if (@res >= 3 and $x == $res[0][0] and $x == $res[1][0] and $x == $res[2][0] and ($y < $res[0][1] and $y < $res[1][1] and $res[0][1] < $res[2][1] and $res[1][1] < $res[2][1]))
209 0 0 if (@res >= 3 and $y == $res[0][1] and $y == $res[1][1] and $y == $res[2][1] and ($x < $res[0][0] and $x < $res[1][0] and $res[0][0] < $res[2][0] and $res[1][0] < $res[2][0]))
217 13 0 @res ? :
223 0 5 if @$f != @$s
228 0 5 if (defined $tolerance)
230 0 0 if abs $f[0][0] - $s[0][0] > $tolerance or abs $f[0][1] - $s[0][1] > $tolerance
237 1 16 if $f[0][0] != $s[0][0] or $f[0][1] != $s[0][1]
246 0 2 if @{$_[0];} != @{$_[1];}
275 0 19 if @_ < 3
280 0 19 unless &polygon_is_closed(@_)
290 3 0 if $y == $py and $py == $ny and $x >= $px || $x >= $nx and $x <= $px || $x <= $nx
294 5 0 if $x == $px and $px == $nx and $y >= $py || $y >= $ny and $y <= $py || $y <= $ny
298 33 17 if ($py == $ny or $y <= $py and $y <= $ny or $y > $py and $y > $ny or $x > $px and $x > $nx)
310 14 3 if $px == $nx or $x <= $xinters
322 0 5 if (ref $_[0] eq 'HASH') { }
330 0 5 unless &polygon_is_closed(@_)
333 1 4 if @_ == 3
336 0 4 exists $args->{'is_large'} ? :
337 0 4 $correct ? :
340 3 1 if $do_move
351 0 4 unless $a != 0
355 3 1 $do_move ? :
360 0 35 unless @_
363 35 0 if $first->[0] == $last->[0]
377 1 19 unless @_
380 1 18 unless (@_)
395 0 72 $len_sq == 0 ? :
397 19 34 $angle > 1 ? :
19 53 $angle < 0 ? :
405 18 54 unless defined $minDist
406 7 65 if $dist < $minDist
417 6 2 ref $format eq 'CODE' ? :