This article by qinning199 Original, reprint please specify: http://www.cocos2dx.net/post/223
1, Cc.rectintersectsrect (RA,RB) to determine whether two rectangles intersect, if intersect, return True
Case:
var recta = Cc.rect (0,0,5,10);
var RECTB = Cc.rect (4,9,5,10);
var r = cc.rectintersectsrect (Recta, RECTB);
if (!r) throw "Fail rectintersectsrect 1";
2, Cc.rectcontainspoint (Rect,point) determines whether a rectangle contains a point, if included, returns True
3, Cc.pointequaltopoint (POINT1,POINT2) to determine whether two points are equal, equal to return True
4, Cc.rectequaltorect (RECT1,RECT2) to determine whether two rectangles are equal
5, Cc._rectequaltozero (rect) to determine whether the rectangle is a 0 matrix
6, Cc.rectoverlapsrect (RECTA,RECTB) to determine whether two rectangles are partially overlapping
7, Cc.rectintersection (RECTA,RECTB) returns two rectangular overlapping parts
8, Cc.rectunion (RECTA,RECTB) returns the smallest rectangle containing the two rectangles
[Cocos2d-js Tutorial] Some common functions in COCOS2D-JS