首页 > 试题广场 >

平面中的矩形 struct Rect { int x;&nb

[问答题]
平面中的矩形
struct Rect {
int x; //顶点坐标x
int y;//顶点坐标y
int w; //高
int h; /宽
}
现在有两个矩形,请写一个程序判断这两个矩形是否有交集(isIntersect)

这道题你会答吗?花几分钟告诉大家答案吧!