MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / isValidDiagonal

Function isValidDiagonal

libs/mapv/mapv.js:2075–2077  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

2073
2074// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
2075function isValidDiagonal(a, b) {
2076 return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);
2077}
2078
2079// signed area of a triangle
2080function area(p, q, r) {

Callers 1

splitEarcutFunction · 0.85

Calls 3

intersectsPolygonFunction · 0.85
locallyInsideFunction · 0.85
middleInsideFunction · 0.85

Tested by

no test coverage detected