Branch Coverage

blib/lib/Math/Shape/Vector.pm
Criterion Covered Total %
branch 51 62 82.2


line true false branch
14 2 1766 unless @_ == 3
21 1 224 unless $_[1]->isa('Math::Shape::Vector')
32 1 328 unless $_[1]->isa('Math::Shape::Vector')
53 1 11 unless $_[1]->isa('Math::Shape::Vector')
55 6 5 $$self{'x'} == $$v2{'x'} && $$self{'y'} == $$v2{'y'} ? :
61 1 41 unless @_ == 2
72 1 96 unless @_ == 2
76 95 1 $divisor ? :
95 1 $divisor ? :
84 0 189 unless @_ == 2
106 0 367 unless $_[1]->isa('Math::Shape::Vector')
117 25 138 unless $sum_of_squares
128 0 95 if $length < 0
136 0 19 unless $_[1]->isa('Math::Shape::Vector')
141 16 3 if ($d > 0) { }
152 0 25 unless $_[1]->isa('Math::Shape::Vector')
161 0 4 unless $_[1]->isa('Math::Shape::Vector')
175 2 4 $radians < 0 ? :
181 0 4 unless $_[1]->isa('Math::Shape::Vector')
190 9 18 if ($other_obj->isa('Math::Shape::Vector')) { }
6 12 elsif ($other_obj->isa('Math::Shape::LineSegment')) { }
4 8 elsif ($other_obj->isa('Math::Shape::Line')) { }
4 4 elsif ($other_obj->isa('Math::Shape::OrientedRectangle')) { }
2 2 elsif ($other_obj->isa('Math::Shape::Circle')) { }
2 0 elsif ($other_obj->isa('Math::Shape::Rectangle')) { }
192 5 4 $$self{'x'} == $$other_obj{'x'} && $$self{'y'} == $$other_obj{'y'} ? :
201 3 3 $lp->is_equal($pr) && $pr->length <= $d->length && 0 <= $pr->dot_product($d) ? :
209 2 2 if $self->collides($$other_obj{'base'})
238 3 1 if ($other_obj->isa('Math::Shape::Vector')) { }
1 0 elsif ($other_obj->isa('Math::Shape::Circle')) { }
0 0 elsif ($other_obj->isa('Math::Shape::OrientedRectangle')) { }