While solving Euler-project problem 165 I used geoml. It seems to me that the code in Segment.intersection is incomplete, as it only checks that the intersection is within (a1,b1). It should also check that p is between (a2,b2). Same applies to Segment.intersects.
I assume it is not an oversight, that Segment.intersects and Segment.intersection have different criteria ('<' vs '<='), since Segment.intersection returns true intersections (a1,b1) whereas Segment.intersects also returns true if the intersection is one of the end-points [a1,b1].
While solving Euler-project problem 165 I used geoml. It seems to me that the code in Segment.intersection is incomplete, as it only checks that the intersection is within (a1,b1). It should also check that p is between (a2,b2). Same applies to Segment.intersects.
I assume it is not an oversight, that Segment.intersects and Segment.intersection have different criteria ('<' vs '<='), since Segment.intersection returns true intersections (a1,b1) whereas Segment.intersects also returns true if the intersection is one of the end-points [a1,b1].