How to check if a line has a point lying inside (and not on the edge) of a triangle. (All in 2D).
Currently, I think I will do this:
- Define the line and each side of the triangle as Ax + By + C = 0 and get xrange.
- Check if the line intersects any of the lines of the triangle.
- If so, check that it is NOT at the end of the line.
Is there a better way to do this?
source
share