I have a line that goes from points A to B; I have (x,y) of both points. I also have a rectangle that's centered at B and the width and height of the rectangle.
I need to find the point in the line that intersects the rectangle. Is there a formula that gives me the (x,y) of that point?
PS: I'm working with C# but a solution in a similar language would be fine.
Thanks