mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Fix intersectRayTriangle from GLM_GTX_intersect #1158
This commit is contained in:
parent
1682a8c360
commit
2171a5b818
@ -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;
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user