I need to find the intersection point of two infinite lines on a 2D plane. In my code, the lines are represented by
- the coordinates of a point I know is on the line.
- a vector.
I'm interested in a CPU efficient algorithm to find the intersection point.
I tried starting from the answers to this question: Determining if two rays intersect , but I don't know how to adapt it for lines that are infinite in both directions, and to get the actual intersection point.