From 9f6697dc2aa34fe6b43165eece299b77b575d0be Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 3 May 2018 16:40:30 +1000 Subject: [PATCH] geom/ray: correct test for negative aabb distance --- geom/ray.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geom/ray.hpp b/geom/ray.hpp index e4a276a4..fabac6c0 100644 --- a/geom/ray.hpp +++ b/geom/ray.hpp @@ -109,7 +109,7 @@ namespace util::geom { return std::numeric_limits::infinity (); // closest is behind us - if (tmax < 0) + if (tmin < 0) return tmax; // closest is in front of us