MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / Intersection

Function Intersection

plugin/seq/splitmesh6.cpp:48–57  ·  view source on GitHub ↗

seg intersection in 2d

Source from the content-addressed store, hash-verified

46using namespace Fem2D;
47// seg intersection in 2d
48R2 Intersection(R2 B,R2 BB,R2 A,R2 AA)
49{
50 double b = -det(A, AA, B);
51 double bb = det(A, AA, BB);
52 double s = b + bb;
53 assert( b/s > 0 && bb/s >=0 );
54 R2 P = BB * b / s + B* bb / s;
55 return P;
56
57}
58// c
59R2 incircleCenter(R2 A, R2 B, R2 C)
60{

Callers 2

incircleCenterFunction · 0.70
SplitMesh6NewFunction · 0.70

Calls 1

detFunction · 0.70

Tested by

no test coverage detected