Branch Coverage

blib/lib/Algorithm/Line/Bresenham.pm
Criterion Covered Total %
branch 53 108 49.0


line true false branch
47 3 3 $x0 < $x1 ? :
49 4 2 $y0 < $y1 ? :
55 0 21 if ($callback) { }
62 6 15 if $x0 == $x1 and $y0 == $y1
64 13 2 if ($e2 >= $dy)
65 10 5 if ($e2 <= $dx)
93 1 0 if $r > $x
94 1 0 if $r <= $y
120 0 1 if ($x0 > $x1)
121 0 1 if $y0 > $y1
133 3 0 if ($e2 >= $dx)
139 0 3 if ($e2 <= $dy)
172 2 0 $x0 < $x2 ? :
173 1 1 $y0 < $y2 ? :
185 0 2 unless ($x0 - $x1) * ($x2 - $x1) <= 0 and ($y0 - $y1) * ($y2 - $y1) <= 0
186 0 2 if ($cur == 0)
193 1 1 if ($cur < 0)
204 0 2 if ($dx >= -$y or $dy <= -$x or $ex <= -$y or $ey >= -$x)
216 7 0 if (2 * $ex >= $dx)
218 2 5 if $x0 == $x2
223 2 3 if ($ey <= 0)
225 0 2 if $y0 == $y2
252 0 1 if ($x * ($x2 - $x1) > 0)
253 0 0 if ($y * ($y2 - $y1) > 0)
254 0 0 if (abs(($y0 - 2 * $y1 + $y2) / $t * $x) > abs $y)
267 1 0 if (($y0 - $y1) * ($y2 - $y1) > 0)
295 1 1 if $vertex < @vertices - 2
351 0 0 if ($error >= $threshold)
370 0 0 if $p
371 0 0 if ($error > $threshold)
383 0 0 if $q == 0 and $p < 2
413 0 0 if ($error >= $threshold)
417 0 0 if ($p_error >= $threshold)
454 16 15 if ($error > $threshold)
474 4 23 if $p
475 12 15 if ($error >= $threshold)
487 0 23 if $q == 0 and $p < 2
515 8 11 if ($error >= $threshold)
519 4 4 if ($p_error >= $threshold)
548 1 0 if ($dx < 0)
549 1 0 if ($dy < 0)
551 0 1 if $dx == 0
552 0 1 if $dy == 0
557 1 0 if ($_ == -5)
558 0 0 if ($_ == -1)
559 0 0 if ($_ == 3)
560 0 0 if ($_ == -4)
561 0 0 if ($_ == 0)
562 0 0 if ($_ == 4)
563 0 0 if ($_ == -3)
564 0 0 if ($_ == 1)
565 0 0 if ($_ == 5)
568 1 0 if ($xch)
573 0 1 if ($dx > $dy) { }