Closed richardalligier closed 3 years ago
Furthermore, inside Circle.segment_intersection
, instead of using Segment.contains
, you could just check that the dot_product
of the vector (a,p) and (a,b) is between 0 and (sq_distance a b) where we want to check if p is inside [a;b]. It could be more reliable because we already know that the point p is on the line defined by (a,b)
Thanks for the issue. Do you by any chance have a fix? if not i will correct it this week-end
I made a pull request
Great! Thank you again, i'm closing this issue
Hi,
There is a mistake on
Segment.contains
. You should usePoint.distance
instead ofPoint.sq_distance
.Best regards, Richard