@turf/boolean-parallel 7.0.0-alpha.1 → 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 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.1",
3
+ "version": "7.0.0-alpha.2",
4
4
  "description": "turf boolean-parallel module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -61,11 +61,11 @@
61
61
  "write-json-file": "*"
62
62
  },
63
63
  "dependencies": {
64
- "@turf/clean-coords": "^7.0.0-alpha.1",
65
- "@turf/helpers": "^7.0.0-alpha.1",
66
- "@turf/line-segment": "^7.0.0-alpha.1",
67
- "@turf/rhumb-bearing": "^7.0.0-alpha.1",
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",
68
68
  "tslib": "^2.3.0"
69
69
  },
70
- "gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
70
+ "gitHead": "dd35b52725945b4fa29a98d9a550733e06cc222e"
71
71
  }