优选地,不使用任何类型的循环,因为这将在游戏中使用.
我希望将一条线与一个任意大小的矩形相交.但我也希望返回交叉点[s].
这是可能的,我做了一些谷歌搜索,但仍然没有解决.
该线使用(x1,y1,x2,y2)定义.矩形也有这两点.
c# intersection collision-detection line
c# ×1
collision-detection ×1
intersection ×1
line ×1