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 vmin = min (t1, t2);
|
||||
auto vmax = min (t1, t2);
|
||||
auto vmax = max (t1, t2);
|
||||
|
||||
auto tmin = min (vmax);
|
||||
auto tmax = max (vmin);
|
||||
auto tmin = max (vmin);
|
||||
auto tmax = min (vmax);
|
||||
|
||||
if (tmax < 0)
|
||||
return tmax;
|
||||
|
Loading…
Reference in New Issue
Block a user