Q: Efficiently find the y on a line at x when only having the start and end point Hi Mathematics StackExchange,
Click this image for a graph(I'm not allowed to post images yet on the Math StackExchange)
Please bare with me here :). So, I have a line. By a line, I mean I have a start point of the line, and the end point. (Also I have the degrees of the angle if that matters).
Now let's say I want to get the the point on the line where it intersects x=10, as you can see in the image.
What would be the most efficient way to do this, with the least calculations? The only way I could think of is making a formula from the two points, and plugging in 10 as x. The reason I'm asking this is because I'm programming something where this calculation has to be done many times per second.
Thanks, I appreciate all responses.

A: The most efficient way to solve this problem would be to consider where you expect this intersection to happen, then have your code search in a neighbourhood around that point, instead of traverse the whole space looking for an intersection. i.e. if your slope of the line is always near 1, you want to look for intersections in a neighbourhood of $x=10$.
Your question is vague, though. I'm not sure this is something that can be optimized with such sparse detail.
