12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef __CCMATHBASE_H__
- #define __CCMATHBASE_H__
- #include <memory>
- #include <string.h>
- #include "platform/CCPlatformMacros.h"
- #define MATH_DEG_TO_RAD(x) ((x) * 0.0174532925f)
- #define MATH_RAD_TO_DEG(x) ((x)* 57.29577951f)
- #define MATH_FLOAT_SMALL 1.0e-37f
- #define MATH_TOLERANCE 2e-37f
- #define MATH_PIOVER2 1.57079632679489661923f
- #define MATH_EPSILON 0.000001f
- #ifdef __cplusplus
- #define NS_CC_MATH_BEGIN namespace cocos2d {
- #define NS_CC_MATH_END }
- #define USING_NS_CC_MATH using namespace cocos2d
- #else
- #define NS_CC_MATH_BEGIN
- #define NS_CC_MATH_END
- #define USING_NS_CC_MATH
- #endif
- #endif
|