Skip to content

Commit

Permalink
Fix intersectRayTriangle from GLM_GTX_intersect #1158
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Dec 20, 2023
1 parent 641bb36 commit c4480f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glm/gtx/intersect.inl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace glm

vec<3, T, Q> Perpendicular(0);

if(det > std::numeric_limits<T>::epsilon())
if (det > static_cast<T>(0))
{
// calculate distance from vert0 to ray origin
vec<3, T, Q> const dist = orig - vert0;
Expand All @@ -63,7 +63,7 @@ namespace glm
if((baryPosition.y < static_cast<T>(0)) || ((baryPosition.x + baryPosition.y) > det))
return false;
}
else if(det < -std::numeric_limits<T>::epsilon())
else if(det < static_cast<T>(0))
{
// calculate distance from vert0 to ray origin
vec<3, T, Q> const dist = orig - vert0;
Expand Down

0 comments on commit c4480f9

Please sign in to comment.