Branch Coverage

blib/lib/Math/Polygon/Calc.pm
Criterion Covered Total %
branch 62 90 68.8


line true false branch
63 0 7 unless &polygon_is_closed(@_)
76 0 0 &polygon_is_clockwise(@_) ? :
81 0 0 &polygon_is_clockwise(@_) ? :
99 0 29 if @_ <= 1
101 29 0 if $ring
109 57 24 if $_[$i][0] - $xmin > $dmin_sq
112 8 16 if ($d_sq < $dmin_sq)
118 21 0 $ring ? :
8 0 $ring ? :
21 8 $rot == 0 ? :
124 5 10 ref $_[0] eq 'HASH' ? :
125 0 15 unless @_
127 3 12 exists $opts{'remove_spikes'} ? :
131 2 13 if @res < 4
136 0 152 if @res < 3
150 47 105 if ($despike and @res >= 2)
152 4 43 if ($res[1][0] == $x and $res[1][1] == $y)
158 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])
166 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])
175 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])
183 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])
192 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]))
200 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]))
209 13 0 @res ? :
215 0 5 if @$f != @$s
219 2 3 if (defined $tolerance)
221 0 8 if abs $f[0][0] - $s[0][0] > $tolerance or abs $f[0][1] - $s[0][1] > $tolerance
229 1 8 if $f[0][0] != $s[0][0] or $f[0][1] != $s[0][1]
238 0 2 if @{$_[0];} != @{$_[1];}
267 0 19 if @_ < 3
272 0 19 unless &polygon_is_closed(@_)
282 3 0 if $y == $py and $py == $ny and $x >= $px || $x >= $nx and $x <= $px || $x <= $nx
286 5 0 if $x == $px and $px == $nx and $y >= $py || $y >= $ny and $y <= $py || $y <= $ny
290 33 17 if ($py == $ny or $y <= $py and $y <= $ny or $y > $py and $y > $ny or $x > $px and $x > $nx)
302 14 3 if $px == $nx or $x <= $xinters
314 0 4 unless &polygon_is_closed(@_)
330 0 30 unless @_
333 30 0 if $first->[0] == $last->[0]
347 1 19 unless @_
350 1 18 unless (@_)
365 0 72 $len_sq == 0 ? :
367 19 34 $angle > 1 ? :
19 53 $angle < 0 ? :
375 18 54 unless defined $minDist
376 7 65 if $dist < $minDist