MCPcopy Create free account
hub / github.com/microsoft/SandDance / locallyInside

Function locallyInside

docs/tests/v2/es6/js/sanddance.js:69840–69844  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

69838
69839// check if a polygon diagonal is locally inside the polygon
69840function locallyInside(a, b) {
69841 return area(a.prev, a, a.next) < 0 ?
69842 area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :
69843 area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
69844}
69845
69846// check if the middle point of a polygon diagonal is inside the polygon
69847function middleInside(a, b) {

Callers 3

cureLocalIntersectionsFunction · 0.70
findHoleBridgeFunction · 0.70
isValidDiagonalFunction · 0.70

Calls 1

areaFunction · 0.70

Tested by

no test coverage detected