check point is on line code example
Example: Point is on line
return distance(A, C) + distance(B, C) == distance(A, B);
// AB is the line, C is the point to check.
return distance(A, C) + distance(B, C) == distance(A, B);
// AB is the line, C is the point to check.