Skip to content

Commit

Permalink
fix untractable alignments (e.g. in the rhombic projection)
Browse files Browse the repository at this point in the history
closes #39
  • Loading branch information
Fil committed Jun 10, 2024
1 parent 89ba8c6 commit 53851be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clip/polygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function clipLine(segments, pointVisible) {
point: (lambda, phi, close) => {
if (cos(lambda) == -1) lambda -= sign(sin(lambda)) * 1e-5; // move away from -180/180 https://github.com/d3/d3-geo/pull/108#issuecomment-323798937
if (close) (lambda = lambda00), (phi = phi00);
let point = cartesian([lambda, phi]);
let point = cartesian([lambda * 0.9999999999, phi + 1e-14]);
let v = v0;
if (point0) {
const intersections = [];
Expand Down

0 comments on commit 53851be

Please sign in to comment.