summaryrefslogtreecommitdiffstats
path: root/libdimension/prtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/prtree.c')
-rw-r--r--libdimension/prtree.c2
1 files changed, 1 insertions, 1 deletions
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