Open GoogleCodeExporter opened 9 years ago
To test if a point lay on a segment you could simply test if distance is zero,
no?
If so, the whole function could be reduced to:
def _intersect_point2(self, Q):
return self.distance(Q) == 0
Or, if instead of True/False you want to return Point/None:
def _intersect_point2(self, Q):
return Q if self.distance(Q) > 0.0 else None
Both versions are one-liners, so that's probably the reason why it's not
implemented.
Original comment by rodrigo....@gmail.com
on 6 Aug 2014 at 9:24
Original issue reported on code.google.com by
enrico.m...@gmail.com
on 13 Apr 2010 at 2:26