@turf/boolean-parallel 7.0.0-alpha.0 → 7.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +1 -1
- package/dist/js/index.js +1 -1
- package/package.json +11 -10
package/dist/es/index.js
CHANGED
|
@@ -51,7 +51,7 @@ function booleanParallel(line1, line2) {
|
|
|
51
51
|
function isParallel(segment1, segment2) {
|
|
52
52
|
var slope1 = bearingToAzimuth(rhumbBearing(segment1[0], segment1[1]));
|
|
53
53
|
var slope2 = bearingToAzimuth(rhumbBearing(segment2[0], segment2[1]));
|
|
54
|
-
return slope1 === slope2;
|
|
54
|
+
return slope1 === slope2 || (slope2 - slope1) % 180 === 0;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Returns Feature's type
|
package/dist/js/index.js
CHANGED
|
@@ -54,7 +54,7 @@ function booleanParallel(line1, line2) {
|
|
|
54
54
|
function isParallel(segment1, segment2) {
|
|
55
55
|
var slope1 = helpers_1.bearingToAzimuth(rhumb_bearing_1.default(segment1[0], segment1[1]));
|
|
56
56
|
var slope2 = helpers_1.bearingToAzimuth(rhumb_bearing_1.default(segment2[0], segment2[1]));
|
|
57
|
-
return slope1 === slope2;
|
|
57
|
+
return slope1 === slope2 || (slope2 - slope1) % 180 === 0;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Returns Feature's type
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/boolean-parallel",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.2",
|
|
4
4
|
"description": "turf boolean-parallel module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"exports": {
|
|
31
31
|
"./package.json": "./package.json",
|
|
32
32
|
".": {
|
|
33
|
+
"types": "./dist/js/index.d.ts",
|
|
33
34
|
"import": "./dist/es/index.js",
|
|
34
35
|
"require": "./dist/js/index.js"
|
|
35
36
|
}
|
|
@@ -40,13 +41,13 @@
|
|
|
40
41
|
"dist"
|
|
41
42
|
],
|
|
42
43
|
"scripts": {
|
|
43
|
-
"bench": "
|
|
44
|
+
"bench": "tsx bench.js",
|
|
44
45
|
"build": "npm-run-all build:*",
|
|
45
46
|
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
|
|
46
47
|
"build:js": "tsc",
|
|
47
|
-
"docs": "
|
|
48
|
+
"docs": "tsx ../../scripts/generate-readmes",
|
|
48
49
|
"test": "npm-run-all test:*",
|
|
49
|
-
"test:tape": "
|
|
50
|
+
"test:tape": "tsx test.js"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@types/tape": "*",
|
|
@@ -54,17 +55,17 @@
|
|
|
54
55
|
"load-json-file": "*",
|
|
55
56
|
"npm-run-all": "*",
|
|
56
57
|
"tape": "*",
|
|
57
|
-
"ts-node": "*",
|
|
58
58
|
"tslint": "*",
|
|
59
|
+
"tsx": "*",
|
|
59
60
|
"typescript": "*",
|
|
60
61
|
"write-json-file": "*"
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
|
-
"@turf/clean-coords": "^7.0.0-alpha.
|
|
64
|
-
"@turf/helpers": "^7.0.0-alpha.
|
|
65
|
-
"@turf/line-segment": "^7.0.0-alpha.
|
|
66
|
-
"@turf/rhumb-bearing": "^7.0.0-alpha.
|
|
64
|
+
"@turf/clean-coords": "^7.0.0-alpha.2",
|
|
65
|
+
"@turf/helpers": "^7.0.0-alpha.2",
|
|
66
|
+
"@turf/line-segment": "^7.0.0-alpha.2",
|
|
67
|
+
"@turf/rhumb-bearing": "^7.0.0-alpha.2",
|
|
67
68
|
"tslib": "^2.3.0"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "dd35b52725945b4fa29a98d9a550733e06cc222e"
|
|
70
71
|
}
|