MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / parallel

Function parallel

code/geometry/lines.cpp:4–5  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2bool collinear(L(a, b), L(p, q)) {
3 return abs(ccw(a, b, p)) < EPS && abs(ccw(a, b, q)) < EPS; }
4bool parallel(L(a, b), L(p, q)) {
5 return abs(cross(b - a, q - p)) < EPS; }
6point closest_point(L(a, b), P(c), bool segment = false) {
7 if (segment) {
8 if (dot(b - a, c - b) > 0) return b;

Callers 1

line_segment_intersectFunction · 0.85

Calls 1

crossFunction · 0.85

Tested by

no test coverage detected