Skip to content

Commit 2db3b4d

Browse files
committed
Updated some line width issues
1 parent dcd29eb commit 2db3b4d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

content/geometry/SegmentIntersection.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Source: https://vlecomte.github.io/cp-geo.pdf
66
* Description:\\
77
\begin{minipage}{75mm}
8-
If a unique intersetion point between the line segments going from s1 to e1 and from s2 to e2 exists then it is returned.
8+
If a unique intersection point between the line segments going from s1 to e1 and from s2 to e2 exists then it is returned.
99
If no intersection point exists an empty vector is returned. If infinitely many exist a vector with 2 elements is returned.
1010
The wrong position will be returned if P is Point<int> and the intersection point does not have integer coordinates.
1111
Products of three coordinates are used in intermediate steps so watch out for overflow if using int or long long.
@@ -24,7 +24,8 @@ Products of three coordinates are used in intermediate steps so watch out for ov
2424
#include "Point.h"
2525
#include "onSegment.h"
2626

27-
template <class P> bool segInterProper(P a, P b, P c, P d, P &out) {
27+
template <class P> bool segInterProper(P a, P b, P c, P d,
28+
P &out) {
2829
double oa = c.cross(d, a), ob = c.cross(d, b),
2930
oc = a.cross(b, c), od = a.cross(b, d);
3031
if (sgn(oa) * sgn(ob) < 0 && sgn(oc) * sgn(od) < 0) {

content/geometry/chapter.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ \section{Geometric primitives}
66
\kactlimport{SegmentDistance.h}
77
\columnbreak
88
\kactlimport{SegmentIntersection.h}
9-
\columnbreak
109
\kactlimport{lineIntersection.h}
1110
\kactlimport{sideOf.h}
1211
\kactlimport{onSegment.h}

content/geometry/onSegment.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
#include "Point.h"
1212

1313
template <class P> bool onSegment(P s, P e, P p) {
14-
return sgn(s.cross(e, p)) == 0 && sgn((s - p).dot(e - p)) <= 0;
14+
return sgn(s.cross(e, p)) == 0 &&
15+
sgn((s - p).dot(e - p)) <= 0;
1516
}

0 commit comments

Comments
 (0)