MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / cross2

Function cross2

Geometry/Half Plane Intersection Dynamic.cpp:50–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 return acos(max((double)-1.0, min((double)1.0, costheta)));
49}
50double cross2(PT a, PT b, PT c) { return cross(b - a, c - a); }
51// intersection point between ab and cd assuming unique intersection exists
52PT line_line_intersection(PT a, PT b, PT c, PT d) {
53 double a1 = a.y - b.y, b1 = b.x - a.x, c1 = cross(a, b);

Callers

nothing calls this directly

Calls 1

crossFunction · 0.70

Tested by

no test coverage detected