8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffa84e0 commit df6316cCopy full SHA for df6316c
src/_path.h
@@ -834,6 +834,13 @@ inline bool segments_intersect(const double &x1,
834
// it looks the atol value matters here bacause of round-off errors
835
const double rtol = 1e-10;
836
const double atol = 1e-13;
837
+
838
+ // if either segment is 0 length, they do not intersect
839
840
+ if ((x1 == x2 && y1 == y2) || (x3 == x3 && y3 == y4)) {
841
+ return false;
842
+ }
843
844
// determinant
845
double den = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));
846
0 commit comments