Skip to content

Commit

Permalink
Make the ray/line intersection return true if the line hits the exact…
Browse files Browse the repository at this point in the history
… beginning or end of a ray
  • Loading branch information
Kazade committed Jan 29, 2014
1 parent b6ca19a commit 3fb103c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kazmath/ray2.c
Expand Up @@ -33,7 +33,7 @@ kmBool kmRay2IntersectLineSegment(const kmRay2* ray, const kmVec2* p1, const kmV
kmScalar x = x1 + ua * (x2 - x1);
kmScalar y = y1 + ua * (y2 - y1);

if((0.0 < ua) && (ua < 1.0) && (0.0 < ub) && (ub < 1.0)) {
if((0.0 <= ua) && (ua <= 1.0) && (0.0 <= ub) && (ub <= 1.0)) {
intersection->x = x;
intersection->y = y;

Expand Down

0 comments on commit 3fb103c

Please sign in to comment.