Skip to content

Instantly share code, notes, and snippets.

@wanewang
Created April 23, 2011 18:23
Show Gist options
  • Save wanewang/938848 to your computer and use it in GitHub Desktop.
Save wanewang/938848 to your computer and use it in GitHub Desktop.
class implementation
@implementation Number
-(void) setReal : (double) r{
real = r;
}
-(void) setImaginary : (double) i{
imaginary = i;
}
-(void) setAll:(double)r :(double)i{
real = r;
imaginary = i;
}
-(void) print{
NSLog(@"%g+%gi\n",real,imaginary);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment