Skip to content

Commit

Permalink
Fixed a bug in the 'LineIntersectsCircle' function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mntndew committed Jun 12, 2014
1 parent d921c3d commit 4a25ba8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Common/GeneralMath.inl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ bool math::LineIntersectsCircle(const sf::Vector2<T> & p1, const sf::Vector2<T>
(p1.y > (p_pos.y + p_radius) && p2.y > (p_pos.y + p_radius)))
{
return false;
}else if (distance(p1, p_pos) <= p_radius || distance(p2, p_pos) <= p_radius)
{
return true;
}

/*
Expand Down

0 comments on commit 4a25ba8

Please sign in to comment.