相关疑难解决方法(0)

如何知道线是否与矩形相交

我已经查看了这个问题,但答案对我来说非常大:

如何知道一条线是否与C#中的平面相交? - 基本2D几何

是否有任何.NET方法可以知道由两个点定义的直线是否与矩形相交?

public bool Intersects(Point a, Point b, Rectangle r)
{
   // return true if the line intersects the rectangle
   // false otherwise
}
Run Code Online (Sandbox Code Playgroud)

提前致谢.

.net c# drawing drawing2d winforms

14
推荐指数
4
解决办法
2万
查看次数

标签 统计

.net ×1

c# ×1

drawing ×1

drawing2d ×1

winforms ×1