Version v2.2.10 - Fix "point is on segment"
What's new
There is obvious mistake (which leads to wrong calculations with oblique lines) in code below
func isOnSegment(Px, Py, Qx, Qy, Rx, Ry int) bool {
if Qx <= maxInt(Px, Rx) && Qx >= maxInt(Px, Rx) && Qy <= maxInt(Py, Ry) && Qy >= maxInt(Py, Ry) {
return true
}
return false
}
Qx >= maxInt(Px, Rx) should be Qx >= minInt(Px, Rx)
Qy >= maxInt(Py, Ry) should be Qy >= minInt(Py, Ry)
Now this is fixed