alexbol99 / flatten-js

Javascript library for 2d geometry
MIT License
551 stars 58 forks source link

Fix segment2segment intersection #145

Closed alexbol99 closed 1 year ago

alexbol99 commented 1 year ago

Fix segment2segment intersection. ip.on.seg check was too strong and could return false because of accuracy loss. Replace it with isPointInSegmentBox in order do not miss intersection point. This should be enough because we know that point lays on the line containing segment.