jzbrooks / vgo

vector graphic optimization
MIT License
43 stars 2 forks source link

Ensure intersection point of lines lies on given segments #64

Closed jzbrooks closed 3 months ago

jzbrooks commented 3 months 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 3 months 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.