diff --git a/cocos/2d/CCActionCamera.cpp b/cocos/2d/CCActionCamera.cpp index beea0b952d..cb02318f0c 100644 --- a/cocos/2d/CCActionCamera.cpp +++ b/cocos/2d/CCActionCamera.cpp @@ -194,11 +194,11 @@ void OrbitCamera::startWithTarget(Node *target) float r, zenith, azimuth; this->sphericalRadius(&r, &zenith, &azimuth); - if( isnan(_radius) ) + if( std::isnan(_radius) ) _radius = r; - if( isnan(_angleZ) ) + if( std::isnan(_angleZ) ) _angleZ = (float)CC_RADIANS_TO_DEGREES(zenith); - if( isnan(_angleX) ) + if( std::isnan(_angleX) ) _angleX = (float)CC_RADIANS_TO_DEGREES(azimuth); _radZ = (float)CC_DEGREES_TO_RADIANS(_angleZ); diff --git a/cocos/2d/CCSpriteFrame.cpp b/cocos/2d/CCSpriteFrame.cpp index 809fcbac89..516d4f7157 100644 --- a/cocos/2d/CCSpriteFrame.cpp +++ b/cocos/2d/CCSpriteFrame.cpp @@ -188,7 +188,7 @@ void SpriteFrame::setAnchorPoint(const Vec2& anchorPoint) bool SpriteFrame::hasAnchorPoint() const { - return !isnan(_anchorPoint.x); + return !std::isnan(_anchorPoint.x); } void SpriteFrame::setTexture(Texture2D * texture) diff --git a/extensions/GUI/CCControlExtension/CCControlUtils.cpp b/extensions/GUI/CCControlExtension/CCControlUtils.cpp index f2c868d20c..97c69a553e 100644 --- a/extensions/GUI/CCControlExtension/CCControlUtils.cpp +++ b/extensions/GUI/CCControlExtension/CCControlUtils.cpp @@ -92,7 +92,7 @@ RGBA ControlUtils::RGBfromHSV(HSV value) if (value.s <= 0.0) // < is bogus, just shuts up warnings { - if (isnan(value.h)) // value.h == NAN + if (std::isnan(value.h)) // value.h == NAN { out.r = value.v; out.g = value.v;