Commit a1f5f038 authored by Timo Koch's avatar Timo Koch
Browse files

[bugfix][geometry] Properly clamp local variables in 1d-1d intersection

parent 30c3240d
......@@ -1381,10 +1381,10 @@ public:
swap(tp, tq);
using std::min; using std::max;
const auto t0 = min(abnorm2, max(0.0, tp));
const auto t1 = max(0.0, min(abnorm2, tq));
tp = min(abnorm2, max(0.0, tp));
tq = max(0.0, min(abnorm2, tq));
if (abs(t0-t1) < eps2)
if (abs(tp-tq) < eps2)
return false;
intersection = Intersection({geo1.global(tp/abnorm2), geo1.global(tq/abnorm2)});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment