I have checked out this question, but the answer is very large for me:
How to know if a line intersects a plane in C#? – Basic 2D geometry
Is there any .NET method to know if a line defined by two points intersects a rectangle?
public bool Intersects(Point a, Point b, Rectangle r)
{
// return true if the line intersects the rectangle
// false otherwise
}
Thanks in advance.
1 Answer