mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
This is a completely wrong use of an algorithm that is meant to be used with *integer* values, e.g. when dealing with pixels on screen, but not for coordinates that are floating point numbers. The algorithm has a fixed tolerance of 1 unit. QgsPoint(5,0.9).onSegment(QgsPoint(0,0), QgsPoint(10,0)) would return 2 (i.e. point is on line segment) See the original code: https://github.com/erich666/GraphicsGems/blob/master/gems/PntOnLine.c