From fd1f2b36e95c03625297b7b8cba3b1a04a0cc0ed Mon Sep 17 00:00:00 2001 From: mzuenni Date: Tue, 10 Jan 2023 11:40:09 +0100 Subject: change whitespaces --- geometry/linesAndSegments.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'geometry/linesAndSegments.cpp') diff --git a/geometry/linesAndSegments.cpp b/geometry/linesAndSegments.cpp index 9ed39c4..3a8ac02 100644 --- a/geometry/linesAndSegments.cpp +++ b/geometry/linesAndSegments.cpp @@ -2,11 +2,11 @@ bool lineSegmentIntersection(pt a, pt b, pt c, pt d) { if (orientation(a, b, c) == 0 && orientation(a, b, d) == 0) return pointOnLineSegment(a,b,c) || - pointOnLineSegment(a,b,d) || - pointOnLineSegment(c,d,a) || - pointOnLineSegment(c,d,b); + pointOnLineSegment(a,b,d) || + pointOnLineSegment(c,d,a) || + pointOnLineSegment(c,d,b); return orientation(a, b, c) * orientation(a, b, d) <= 0 && - orientation(c, d, a) * orientation(c, d, b) <= 0; + orientation(c, d, a) * orientation(c, d, b) <= 0; } // Berechnet die Schnittpunkte der Strecken p0-p1 und p2-p3. @@ -18,7 +18,7 @@ vector lineSegmentIntersection(pt p0, pt p1, pt p2, pt p3) { double c = cross(p1 - p0, p0 - p2); if (a < 0) {a = -a; b = -b; c = -c;} if (b < -EPS || a-b < -EPS || - c < -EPS || a-c < -EPS) return {}; + c < -EPS || a-c < -EPS) return {}; if (a > EPS) return {p0 + b/a*(p1 - p0)}; vector result; auto insertUnique = [&](pt p) { -- cgit v1.2.3