issue #171, implement CGRectIntersectsRect

This commit is contained in:
Walzer 2010-09-29 08:06:03 +00:00
parent b8f59f623d
commit f1c48be489
2 changed files with 5 additions and 7 deletions

View File

@ -134,10 +134,10 @@ bool CGRect::CGRectContainsPoint(const CGRect& rect, const CGPoint& point)
bool CGRect::CGRectIntersectsRect(const CGRect& rectA, const CGRect& rectB)
{
return !(rectA.CGRectGetMaxX() < rectB.CGRectGetMinX()||
rectB.CGRectGetMaxX() < rectA.CGRectGetMinX()||
rectA.CGRectGetMaxY() < rectB.CGRectGetMinY()||
rectB.CGRectGetMaxY() < rectA.CGRectGetMinY());
return !(CGRectGetMaxX(rectA) < CGRectGetMinX(rectB)||
CGRectGetMaxX(rectB) < CGRectGetMinX(rectA)||
CGRectGetMaxY(rectA) < CGRectGetMinY(rectB)||
CGRectGetMaxY(rectB) < CGRectGetMinY(rectB));
}
}//namespace cocos2d {

View File

@ -30,6 +30,7 @@ THE SOFTWARE.
#include "CCProtocols.h"
#include "CCSpriteFrame.h"
namespace cocos2d {
/**
@brief An interval action is an action that takes place within a certain period of time.
It has an start time, and a finish time. The finish time is the parameter
@ -47,9 +48,6 @@ Example:
CCAction *pingPongAction = CCSequence::actions(action, action->reverse(), NULL);
*/
namespace cocos2d {
class CCX_DLL CCIntervalAction : public CCFiniteTimeAction
{
public: