geom/ray: correct test for negative aabb distance

This commit is contained in:
Danny Robson 2018-05-03 16:40:30 +10:00
parent cfefca7767
commit 9f6697dc2a

View File

@ -109,7 +109,7 @@ namespace util::geom {
return std::numeric_limits<T>::infinity ();
// closest is behind us
if (tmax < 0)
if (tmin < 0)
return tmax;
// closest is in front of us