line: reorder constants in box intersect
This commit is contained in:
parent
0ba8b414b4
commit
50f1e79ed9
6
line.cpp
6
line.cpp
@ -59,10 +59,10 @@ util::line<S,T>::intersect (region<S,T> r) const
|
|||||||
auto t2 = (r.away () - p) / d;
|
auto t2 = (r.away () - p) / d;
|
||||||
|
|
||||||
auto vmin = min (t1, t2);
|
auto vmin = min (t1, t2);
|
||||||
auto vmax = min (t1, t2);
|
auto vmax = max (t1, t2);
|
||||||
|
|
||||||
auto tmin = min (vmax);
|
auto tmin = max (vmin);
|
||||||
auto tmax = max (vmin);
|
auto tmax = min (vmax);
|
||||||
|
|
||||||
if (tmax < 0)
|
if (tmax < 0)
|
||||||
return tmax;
|
return tmax;
|
||||||
|
Loading…
Reference in New Issue
Block a user