How to determine whether the point lies on a straight line. I will specify - straight thick, that is, in fact, it is an inclined rectangle.
I tried using the formula taken from this question and with a small error.
In the case of oblique lines, everything works. But if the line is horizontal or vertical, then the calculation using this formula is equal to Infinity . And if there are several straight lines, then, accordingly, it is impossible to determine on which of them the point is located
Please tell me the algorithm.