3636#import " CCActionEase.h"
3737
3838#ifndef M_PI_X_2
39- #define M_PI_X_2 ( float ) M_PI * 2.0
39+ #define M_PI_X_2 M_PI * 2.0
4040#endif
4141
4242#pragma mark EaseAction
@@ -98,7 +98,7 @@ -(CCActionInterval*) reverse
9898@implementation CCActionEaseSineIn
9999-(void ) update : (CCTime) t
100100{
101- [_inner update: -1 *cosf (t * ( float ) M_PI_2) +1 ];
101+ [_inner update: -1 *cosf (t * M_PI_2) +1 ];
102102}
103103
104104- (CCActionInterval*) reverse
@@ -113,7 +113,7 @@ - (CCActionInterval*) reverse
113113@implementation CCActionEaseSineOut
114114-(void ) update : (CCTime) t
115115{
116- [_inner update: sinf (t * ( float ) M_PI_2)];
116+ [_inner update: sinf (t * M_PI_2)];
117117}
118118
119119- (CCActionInterval*) reverse
@@ -128,7 +128,7 @@ - (CCActionInterval*) reverse
128128@implementation CCActionEaseSineInOut
129129-(void ) update : (CCTime) t
130130{
131- [_inner update: -0.5 *(cosf ( ( float ) M_PI*t) - 1 )];
131+ [_inner update: -0.5 *(cosf ( M_PI*t) - 1 )];
132132}
133133@end
134134
@@ -138,12 +138,12 @@ -(void) update: (CCTime) t
138138
139139@implementation CCActionEaseRate
140140@synthesize rate=_rate;
141- +(instancetype ) actionWithAction : (CCActionInterval*) action rate : (float )rate
141+ +(instancetype ) actionWithAction : (CCActionInterval*) action rate : (CGFloat )rate
142142{
143143 return [[self alloc ] initWithAction: action rate: rate];
144144}
145145
146- -(id ) initWithAction : (CCActionInterval*) action rate : (float )rate
146+ -(id ) initWithAction : (CCActionInterval*) action rate : (CGFloat )rate
147147{
148148 if ( (self=[super initWithAction: action ]) )
149149 self.rate = rate;
@@ -214,7 +214,7 @@ +(instancetype) actionWithAction: (CCActionInterval*) action
214214 return [[self alloc ] initWithAction: action period: 0.3 ];
215215}
216216
217- +(instancetype ) actionWithAction : (CCActionInterval*) action period : (float )period
217+ +(instancetype ) actionWithAction : (CCActionInterval*) action period : (CGFloat )period
218218{
219219 return [[self alloc ] initWithAction: action period: period];
220220}
@@ -224,7 +224,7 @@ -(id) initWithAction: (CCActionInterval*) action
224224 return [self initWithAction: action period: 0.3 ];
225225}
226226
227- -(id ) initWithAction : (CCActionInterval*) action period : (float )period
227+ -(id ) initWithAction : (CCActionInterval*) action period : (CGFloat )period
228228{
229229 if ( (self=[super initWithAction: action]) )
230230 _period = period;
@@ -255,7 +255,7 @@ -(void) update: (CCTime) t
255255 newT = t;
256256
257257 else {
258- float s = _period / 4 ;
258+ CGFloat s = _period / 4 ;
259259 t = t - 1 ;
260260 newT = -powf (2 , 10 * t) * sinf ( (t-s) *M_PI_X_2 / _period);
261261 }
@@ -279,7 +279,7 @@ -(void) update: (CCTime) t
279279 newT = t;
280280
281281 } else {
282- float s = _period / 4 ;
282+ CGFloat s = _period / 4 ;
283283 newT = powf (2 , -10 * t) * sinf ( (t-s) *M_PI_X_2 / _period) + 1 ;
284284 }
285285 [_inner update: newT];
0 commit comments