diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2024-08-22 22:20:14 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2024-08-22 22:20:14 +0200 |
| commit | e1803aee4e150088b0865954de476edf182a9ffe (patch) | |
| tree | 68edc03c3dbe78efde19fd853d7d28b1d9e246f6 /content | |
| parent | c31dcca8b822a38298c3dd624c3c1c0c23caa57d (diff) | |
improve segmentIntersection
Diffstat (limited to 'content')
| -rw-r--r-- | content/geometry/segmentIntersection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/geometry/segmentIntersection.cpp b/content/geometry/segmentIntersection.cpp index 4262ddc..acce7cc 100644 --- a/content/geometry/segmentIntersection.cpp +++ b/content/geometry/segmentIntersection.cpp @@ -18,8 +18,8 @@ struct event { int id, type; bool operator<(const event& o) const { if (real(p) != real(o.p)) return real(p) < real(o.p); - if (type != o.type) return type > o.type; - return imag(p) < imag(o.p); + if (imag(p) != imag(o.p)) return imag(p) < imag(o.p); + return type > o.type; } }; |
