Branch Coverage

blib/lib/Math/Shape/Vector.pm
Criterion Covered Total %
branch 48 58 82.7


line true false branch
14 2 1747 unless @_ == 3
21 1 224 unless $_[1]->isa('Math::Shape::Vector')
32 1 324 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 92 unless @_ == 2
76 91 1 $divisor ? :
91 1 $divisor ? :
84 0 189 unless @_ == 2
106 0 367 unless $_[1]->isa('Math::Shape::Vector')
117 25 134 unless $sum_of_squares
128 0 91 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')
176 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')) { }
178 5 4 $$self{'x'} == $$other_obj{'x'} && $$self{'y'} == $$other_obj{'y'} ? :
187 3 3 $lp->is_equal($pr) && $pr->length <= $d->length && 0 <= $pr->dot_product($d) ? :
195 2 2 if $self->collides($$other_obj{'base'})
224 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')) { }