- boolean judgeOverlap(Rect A, Rect B){
- if(A.right < B.left) return false;
- if(A.left > B.right ) return false;
- if(A.top < B.bottom) return false;
- if(A.bottom > B.top) return false;
- return true;
- }
- //该片段来自于http://www.codesnippet.cn/detail/1011201410919.html
来源: http://www.codesnippet.cn/detail/1011201410919.html