Try this:
Lines 41-42
! IF ret=1 OR ret=3 OR ret=4 THEN
IF ret=1 OR ret=4 THEN
Maybe ret=3 means that the point is on the line but not necessarily between the points.
Perhaps You should test it properly but it worked fine by me.
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.