Merge branch 'fix_isnan' of https://github.com/gelldur/cocos2d-x into issue-15522

This commit is contained in:
minggo 2016-05-05 10:17:17 +08:00
commit 03b38bcee2
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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;