Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
-(NSMutableArray*) getMinimumAreaEnclosingRectangle:(NSMutableArray*) position{ float x = [[position objectAtIndex:0] floatValue]; float y = [[position objectAtIndex:1] floatValue]; float z = [[position objectAtIndex:2] floatValue]; //for now assume that all objects have a 1x1X1 block shape. NSMutableArray *intervals = [NSMutableArray array]; [intervals addObject:[NSMutableArray arrayWithObjects: [NSNumber numberWithFloat:x-0.5f], [NSNumber numberWithFloat:x+0.5f], nil]]; [intervals addObject:[NSMutableArray arrayWithObjects: [NSNumber numberWithFloat:y-0.5f], [NSNumber numberWithFloat:y+0.5f], nil]]; [intervals addObject:[NSMutableArray arrayWithObjects: [NSNumber numberWithFloat:z-0.5f], [NSNumber numberWithFloat:z+0.5f], nil]]; return intervals; }
From the Design Piracy series on my blog: