diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2026-06-21 00:32:58 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2026-06-21 00:32:58 +0200 |
| commit | d697207cde39a5a26361d693d1ccb3d5e7616d81 (patch) | |
| tree | cd0917a879c0a71db8bf0dcbf20cb62c82a308b0 /content/geometry | |
| parent | 0ccedaad1cdfc6011b3f9ece036a1a0be2d379dd (diff) | |
avoid overflow in ccw*ccw
Diffstat (limited to 'content/geometry')
| -rw-r--r-- | content/geometry/formulas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/geometry/formulas.cpp b/content/geometry/formulas.cpp index 5d4e10d..f724398 100644 --- a/content/geometry/formulas.cpp +++ b/content/geometry/formulas.cpp @@ -24,7 +24,7 @@ auto cross(pt p, pt a, pt b) {return cross(a - p, b - p);} // 1 => c links von a->b // 0 => a, b und c kolliniear // -1 => c rechts von a->b -int ccw(pt a, pt b, pt c) { +ll ccw(pt a, pt b, pt c) { auto orien = cross(b - a, c - a); return (orien > EPS) - (orien < -EPS); } |
