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

Function tangent_inner

code/geometry/circles.cpp:35–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 Q.first = A + normalize(u, rA);
34 Q.second = B + normalize(u, rB); }
35void tangent_inner(C(A,rA), C(B,rB), PP(P), PP(Q)) {
36 point ip = (rA*B + rB*A)/(rA+rB);
37 assert(tangent(ip, A, rA, P.first, Q.first) == 2);
38 assert(tangent(ip, B, rB, P.second, Q.second) == 2); }
39pair<point,double> circumcircle(point a, point b, point c) {
40 b -= a, c -= a;
41 point p = perp(b*norm(c)-c*norm(b))/2.0/cross(b, c);

Callers

nothing calls this directly

Calls 1

tangentFunction · 0.85

Tested by

no test coverage detected