@turf/area
Advanced tools
Comparing version 6.2.0-alpha.2 to 6.2.0-alpha.3
@@ -85,3 +85,4 @@ import { geomReduce } from "@turf/meta"; | ||
for (i = 0; i < coordsLength; i++) { | ||
if (i === coordsLength - 2) { // i = N-2 | ||
if (i === coordsLength - 2) { | ||
// i = N-2 | ||
lowerIndex = coordsLength - 2; | ||
@@ -91,3 +92,4 @@ middleIndex = coordsLength - 1; | ||
} | ||
else if (i === coordsLength - 1) { // i = N-1 | ||
else if (i === coordsLength - 1) { | ||
// i = N-1 | ||
lowerIndex = coordsLength - 1; | ||
@@ -97,3 +99,4 @@ middleIndex = 0; | ||
} | ||
else { // i = 0 to N-3 | ||
else { | ||
// i = 0 to N-3 | ||
lowerIndex = i; | ||
@@ -108,3 +111,3 @@ middleIndex = i + 1; | ||
} | ||
total = total * RADIUS * RADIUS / 2; | ||
total = (total * RADIUS * RADIUS) / 2; | ||
} | ||
@@ -114,3 +117,3 @@ return total; | ||
function rad(num) { | ||
return num * Math.PI / 180; | ||
return (num * Math.PI) / 180; | ||
} |
@@ -88,3 +88,4 @@ "use strict"; | ||
for (i = 0; i < coordsLength; i++) { | ||
if (i === coordsLength - 2) { // i = N-2 | ||
if (i === coordsLength - 2) { | ||
// i = N-2 | ||
lowerIndex = coordsLength - 2; | ||
@@ -94,3 +95,4 @@ middleIndex = coordsLength - 1; | ||
} | ||
else if (i === coordsLength - 1) { // i = N-1 | ||
else if (i === coordsLength - 1) { | ||
// i = N-1 | ||
lowerIndex = coordsLength - 1; | ||
@@ -100,3 +102,4 @@ middleIndex = 0; | ||
} | ||
else { // i = 0 to N-3 | ||
else { | ||
// i = 0 to N-3 | ||
lowerIndex = i; | ||
@@ -111,3 +114,3 @@ middleIndex = i + 1; | ||
} | ||
total = total * RADIUS * RADIUS / 2; | ||
total = (total * RADIUS * RADIUS) / 2; | ||
} | ||
@@ -117,3 +120,3 @@ return total; | ||
function rad(num) { | ||
return num * Math.PI / 180; | ||
return (num * Math.PI) / 180; | ||
} |
{ | ||
"name": "@turf/area", | ||
"version": "6.2.0-alpha.2", | ||
"version": "6.2.0-alpha.3", | ||
"description": "turf area module", | ||
@@ -26,2 +26,6 @@ "author": "Turf Authors", | ||
"module": "dist/es/index.js", | ||
"exports": { | ||
"import": "./dist/es/index.js", | ||
"require": "./dist/js/index.js" | ||
}, | ||
"types": "dist/js/index.d.ts", | ||
@@ -33,10 +37,9 @@ "sideEffects": false, | ||
"scripts": { | ||
"bench": "npm-run-all prepare bench:run", | ||
"bench:run": "node bench.js", | ||
"bench": "ts-node bench.js", | ||
"build": "npm-run-all build:*", | ||
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json", | ||
"build:js": "tsc", | ||
"docs": "node ../../scripts/generate-readmes", | ||
"prepare": "npm-run-all prepare:*", | ||
"prepare:es": "tsc --outDir dist/es --module esnext --declaration false", | ||
"prepare:js": "tsc", | ||
"test": "npm-run-all prepare test:*", | ||
"test:tape": "node -r esm test.js" | ||
"test": "npm-run-all test:*", | ||
"test:tape": "ts-node -r esm test.js" | ||
}, | ||
@@ -49,2 +52,3 @@ "devDependencies": { | ||
"tape": "*", | ||
"ts-node": "*", | ||
"tslint": "*", | ||
@@ -55,6 +59,6 @@ "typescript": "*", | ||
"dependencies": { | ||
"@turf/helpers": "^6.2.0-alpha.2", | ||
"@turf/meta": "^6.2.0-alpha.2" | ||
"@turf/helpers": "^6.2.0-alpha.3", | ||
"@turf/meta": "^6.2.0-alpha.3" | ||
}, | ||
"gitHead": "23d5cb91d77e0c1e2e903a2252f525797f1d0d09" | ||
"gitHead": "dce9edfc705352e8cb9e0083c9330ba0e8d77409" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11178
7
248
9
Updated@turf/helpers@^6.2.0-alpha.3
Updated@turf/meta@^6.2.0-alpha.3