mirror of https://github.com/axmolengine/axmol.git
Merge branch 'fix_isnan' of https://github.com/gelldur/cocos2d-x into issue-15522
This commit is contained in:
commit
03b38bcee2
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue