Skip to content

Commit

Permalink
PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
panquez committed Jul 30, 2024
1 parent be5f829 commit 7013cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geode/geometry/intersection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ namespace geode
const Vector3D diff{ vertices[0], line.origin() };
const auto d_dot_q_cross_e2 =
sign * line.direction().dot( diff.cross( edge2 ) );
if( d_dot_q_cross_e2 >= 0 )
if( d_dot_q_cross_e2 >= -GLOBAL_EPSILON )
{
const auto d_dot_e1_cross_q =
sign * line.direction().dot( edge1.cross( diff ) );
if( d_dot_e1_cross_q >= 0
if( d_dot_e1_cross_q >= -GLOBAL_EPSILON
&& d_dot_q_cross_e2 + d_dot_e1_cross_q <= d_dot_n )
{
// InfiniteLine intersects triangle.
Expand Down

0 comments on commit 7013cc2

Please sign in to comment.