Skip to content

Commit

Permalink
Fixes #15 - certain calculations were incorrect in PRTweenCGRectLerpP…
Browse files Browse the repository at this point in the history
…eriod.tweenedValueForProgress
  • Loading branch information
Dom Hofmann committed Jan 27, 2012
1 parent c16e807 commit 1ef41e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/PRTween.m
Expand Up @@ -91,7 +91,7 @@ - (NSValue *)tweenedValueForProgress:(CGFloat)progress {
CGRect startRect = self.startCGRect;
CGRect endRect = self.endCGRect;
CGRect distance = CGRectMake(endRect.origin.x - startRect.origin.x, endRect.origin.y - startRect.origin.y, endRect.size.width - startRect.size.width, endRect.size.height - startRect.size.height);
CGRect tweenedRect = CGRectMake(startRect.origin.x + distance.origin.x * progress, startRect.origin.y + distance.origin.y * progress, startRect.size.width + endRect.size.width * progress, startRect.size.height + endRect.size.height * progress);
CGRect tweenedRect = CGRectMake(startRect.origin.x + distance.origin.x * progress, startRect.origin.y + distance.origin.y * progress, startRect.size.width + distance.size.width * progress, startRect.size.height + distance.size.height * progress);

return [NSValue valueWithCGRect:tweenedRect];

Expand Down

0 comments on commit 1ef41e8

Please sign in to comment.