diff --git a/cocos2d/actions/CCActionInterval.js b/cocos2d/actions/CCActionInterval.js index 1fbcf94d2a..3fb7d14d35 100644 --- a/cocos2d/actions/CCActionInterval.js +++ b/cocos2d/actions/CCActionInterval.js @@ -81,7 +81,7 @@ cc.ActionInterval = cc.FiniteTimeAction.extend({ * @return {Boolean} */ initWithDuration:function (d) { - this._duration = (d === 0) ? cc.FLT_EPSILON : d; + this._duration = (d === 0) ? cc.macro.FLT_EPSILON : d; // prevent division by 0 // This comparison could be in step:, but it might decrease the performance // by 3% in heavy based action games. @@ -156,7 +156,7 @@ cc.ActionInterval = cc.FiniteTimeAction.extend({ this._elapsed += dt; //this.update((1 > (this._elapsed / this._duration)) ? this._elapsed / this._duration : 1); - //this.update(Math.max(0, Math.min(1, this._elapsed / Math.max(this._duration, cc.FLT_EPSILON)))); + //this.update(Math.max(0, Math.min(1, this._elapsed / Math.max(this._duration, cc.macro.FLT_EPSILON)))); var t = this._elapsed / (this._duration > 0.0000001192092896 ? this._duration : 0.0000001192092896); t = (1 > t ? t : 1); this.update(t > 0 ? t : 0);