math cocos2d fixes
Merge pull request #6584 from ricardoquesada/math_cocos2d_fixes

math cocos2d fixes