// integer 
int i = -123;
NSLog(@"%d : abs value : %d", i, abs(i));

// float
float f = -0.123f;
NSLog(@"%f : abs value : %f", f, fabsf(i));
Blog Comments powered by Disqus.

Previous Post Next Post