#ifndef __CCUTILMATH_H__
#define __CCUTILMATH_H__
#include "CCArmatureDefine.h"
#include <math.h>
NS_CC_EXT_BEGIN
#define CC_DOUBLE_PI (M_PI*2)
#define CC_HALF_PI (M_PI * 0.5f)
//! hit test function
bool isSpriteContainPoint(CCSprite *sprite, CCPoint point);
bool isSpriteContainPoint(CCSprite *sprite, CCPoint point, CCPoint &outPoint);
#define CC_SPRITE_CONTAIN_POINT(sprite, point) isSpriteContainPoint((sprite), (point))
#define CC_SPRITE_CONTAIN_POINT_WITH_RETURN(sprite, point, outPoint) isSpriteContainPoint((sprite), (point), outPoint)
//! motion curve function
CCPoint bezierTo(float t, CCPoint &point1, CCPoint &point2, CCPoint &point3);
CCPoint bezierTo(float t, CCPoint &point1, CCPoint &point2, CCPoint &point3, CCPoint &point4);
CCPoint circleTo(float t, CCPoint ¢er, float radius, float fromRadian, float radianDif);
NS_CC_EXT_END
#endif /*__CCUTILMATH_H__*/