diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-11-02 02:19:11 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-11-02 02:19:11 -0400 |
commit | 80a358eb7e588200e54ee3030c5bd457a4473647 (patch) | |
tree | 854c28757085e8f266bd6087d988c02f429d2404 /libdimension | |
parent | 2c7cb763dcb69e3c0464298e41e30cdc2b0f1cfb (diff) | |
download | dimension-80a358eb7e588200e54ee3030c5bd457a4473647.tar.xz |
Slight ray-AABB intersection test optimization.
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/prtree.c | 2 |
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 |