I need to find the point of intersection between some square xy + N,N where N is the size of the square and some line x1,y1,x2,y2 where x1,y1 lies on the center point of the square. Assume that the square is parallel to the x-axis & y-axis.
Related Questions:
The answer in #1 provided essentially explains that you clamp one of the coordinates of the line to the square, which is inaccurate and produces incorrect results. The answer in #2 provides some obscure formula which isn't explained.