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

Function getLeftmost

libs/mapv/mapv.js:2058–2067  ·  view source on GitHub ↗
(start)

Source from the content-addressed store, hash-verified

2056
2057// find the leftmost node of a polygon ring
2058function getLeftmost(start) {
2059 var p = start,
2060 leftmost = start;
2061 do {
2062 if (p.x < leftmost.x) leftmost = p;
2063 p = p.next;
2064 } while (p !== start);
2065
2066 return leftmost;
2067}
2068
2069// check if a point lies within a convex triangle
2070function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {

Callers 1

eliminateHolesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected