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

Function signedArea

libs/mapv/mapv.js:2221–2228  ·  view source on GitHub ↗
(data, start, end, dim)

Source from the content-addressed store, hash-verified

2219};
2220
2221function signedArea(data, start, end, dim) {
2222 var sum = 0;
2223 for (var i = start, j = end - dim; i < end; i += dim) {
2224 sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
2225 j = i;
2226 }
2227 return sum;
2228}
2229
2230// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts
2231earcut.flatten = function (data) {

Callers 2

linkedListFunction · 0.85
mapv.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected