From 80a358eb7e588200e54ee3030c5bd457a4473647 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 2 Nov 2010 02:19:11 -0400 Subject: Slight ray-AABB intersection test optimization. --- libdimension/prtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdimension/prtree.c b/libdimension/prtree.c index 479f3cb..3367384 100644 --- a/libdimension/prtree.c +++ b/libdimension/prtree.c @@ -589,7 +589,7 @@ dmnsn_ray_box_intersection(dmnsn_optimized_line optline, tmin = dmnsn_max(tmin, dmnsn_min(tz1, tz2)); tmax = dmnsn_min(tmax, dmnsn_max(tz1, tz2)); - return tmax >= 0.0 && tmax >= tmin && tmin < t; + return tmax >= dmnsn_max(0.0, tmin) && tmin < t; } static void -- cgit v1.2.3