jzbrooks / vgo

vector graphic optimization
MIT License
39 stars 1 forks source link

Ensure intersection point of lines lies on given segments #64

Closed jzbrooks closed 1 month ago

jzbrooks commented 1 month ago

The calculation for line intersection was correct, but the intersection point wasn't ensured to lie on both of the line segments. So the calculation was incorrect.

Fixes #60

jzbrooks commented 1 month ago

It turned out this effectively turned the optimization off, which should be done more explicitly if needed.

The line segments probably never actually cross, but we need to compute the intersection of the line, not the line segment.