Created
May 6, 2013 17:36
-
-
Save alistra/5526666 to your computer and use it in GitHub Desktop.
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
- (instancetype)initWithPoints:(NSArray *)points { | |
NSParameterAssert(points); | |
NSParameterAssert([points objectAtIndex:0]); | |
NSParameterAssert([[points objectAtIndex:0] isKindOfClass:[NSValue class]]); | |
self = [super init]; | |
if (self) { | |
for (NSValue *value in points) { | |
[self.points addObject:value]; | |
} | |
} | |
return self; | |
} | |
// super init: | |
- (instancetype)init { | |
self = [super init]; | |
if (self) { | |
self.lines = [NSMutableArray array]; | |
self.points = [NSMutableArray array]; | |
} | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment