var t=function(t){if(!t||t.length<3)return null;for(var e=0,u=0,n=0,i=t.length,l=0;l<i;l+=1){var r=t[l],d=t[(l+1)%i],a=r.longitude*d.latitude-d.longitude*r.latitude;e+=a,u+=(r.latitude+d.latitude)*a,n+=(r.longitude+d.longitude)*a}if(e*=.5,Math.abs(e)<1e-10)return{latitude:t.reduce((function(t,e){return t+e.latitude}),0)/i,longitude:t.reduce((function(t,e){return t+e.longitude}),0)/i};var o=1/(6*e);return{latitude:u*=o,longitude:n*=o}};export{t as calculatePolygonCentroid};
//# sourceMappingURL=calculatePolygonCentroid.js.map
