Branch Coverage

blib/lib/Math/Polygon/Calc.pm
Criterion Covered Total %
branch 64 92 69.5


line true false branch
68 0 7 unless &polygon_is_closed(@_)
81 0 0 &polygon_is_clockwise(@_) ? :
86 0 0 &polygon_is_clockwise(@_) ? :
104 0 29 if @_ <= 1
106 29 0 if $ring
114 57 24 if $_[$i][0] - $xmin > $dmin_sq
117 8 16 if ($d_sq < $dmin_sq)
123 21 0 $ring ? :
8 0 $ring ? :
21 8 $rot == 0 ? :
129 5 10 ref $_[0] eq 'HASH' ? :
130 0 15 unless @_
132 3 12 exists $opts{'remove_spikes'} ? :
135 2 13 if @res < 4
140 0 152 if @res < 3
154 47 105 if ($despike and @res >= 2)
156 4 43 if ($res[1][0] == $x and $res[1][1] == $y)
162 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])
170 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])
179 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])
187 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])
196 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]))
204 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]))
213 13 0 @res ? :
219 0 5 if @$f != @$s
223 2 3 if (defined $tolerance)
225 0 8 if abs $f[0][0] - $s[0][0] > $tolerance or abs $f[0][1] - $s[0][1] > $tolerance
233 1 8 if $f[0][0] != $s[0][0] or $f[0][1] != $s[0][1]
242 0 2 if @{$_[0];} != @{$_[1];}
271 0 19 if @_ < 3
276 0 19 unless &polygon_is_closed(@_)
286 3 0 if $y == $py and $py == $ny and $x >= $px || $x >= $nx and $x <= $px || $x <= $nx
290 5 0 if $x == $px and $px == $nx and $y >= $py || $y >= $ny and $y <= $py || $y <= $ny
294 33 17 if ($py == $ny or $y <= $py and $y <= $ny or $y > $py and $y > $ny or $x > $px and $x > $nx)
306 14 3 if $px == $nx or $x <= $xinters
318 0 4 unless &polygon_is_closed(@_)
334 0 30 unless @_
337 30 0 if $first->[0] == $last->[0]
351 1 19 unless @_
354 1 18 unless (@_)
369 0 72 $len_sq == 0 ? :
371 19 34 $angle > 1 ? :
19 53 $angle < 0 ? :
379 18 54 unless defined $minDist
380 7 65 if $dist < $minDist
393 6 2 ref $format eq 'CODE' ? :