MCPcopy Index your code
hub / github.com/microsoft/SandDance / area

Function area

docs/app/js/sanddance-app.js:102031–102033  ·  view source on GitHub ↗
(p, q, r)

Source from the content-addressed store, hash-verified

102029 return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
102030}
102031function area(p, q, r) {
102032 return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
102033}
102034function equals(p1, p2) {
102035 return p1.x === p2.x && p1.y === p2.y;
102036}

Callers 9

filterPointsFunction · 0.70
isEarFunction · 0.70
isEarHashedFunction · 0.70
sectorContainsSectorFunction · 0.70
isValidDiagonalFunction · 0.70
intersectsFunction · 0.70
locallyInsideFunction · 0.70
mergeArcsFunction · 0.70
contourFunction · 0.70

Calls 2

planarRingAreaFunction · 0.70
curveFunction · 0.70

Tested by

no test coverage detected