Created
July 19, 2012 19:11
-
-
Save basecode/3146086 to your computer and use it in GitHub Desktop.
CGGeometry+Additions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CGGeometry+Additions.h | |
// Copyright (c) 2012 Tobias Reiss (MIT License) | |
#import <CoreGraphics/CGGeometry.h> | |
CG_INLINE CGRect CGRectScale(CGRect rect, CGFloat mult) { | |
CGPoint origin = rect.origin; | |
CGSize size = rect.size; | |
return CGRectMake(origin.x * mult, origin.y * mult, size.width * mult, size.height * mult); | |
} | |
CG_INLINE CGSize CGSizeScale(CGSize size, CGFloat mult) { | |
return CGSizeMake(size.width * mult, size.height * mult); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CGGeometry+Additions.m | |
// Copyright (c) 2012 Tobias Reiss (MIT License) | |
#import "CGGeometry+Additions.h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment