Permalink
Browse files

LayerGradient: interpolation mode fixed.

  • Loading branch information...
1 parent 473dc58 commit bb5e09b8d5435dc29a3bed5c9f29747f6ebb2f27 @ricardoquesada ricardoquesada committed Jan 22, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −1 cocos2d/CCLayer.m
  2. +0 −1 tests/LayerTest.m
View
@@ -457,7 +457,7 @@ - (void) updateColor
// Compress Interpolation mode
if( compressInterpolation_ ) {
- float h2 = 1 / ( fabsf(vector_.x) + fabsf(vector_.y) );
+ float h2 = 1 / ( fabsf(u.x) + fabsf(u.y) );
u = ccpMult(u, h2 * (float)c);
}
View
@@ -335,7 +335,6 @@ -(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
CCLayerGradient *gradient = (CCLayerGradient*) [self getChildByTag:1];
- NSLog(@"Gradient new vector: %f,%f",diff.x, diff.y);
[gradient setVector:diff];
}

0 comments on commit bb5e09b

Please sign in to comment.