What is "fabs" in Objective C?

c, objective-c

Solution

`double fabs( double )` - returns the absolute value of the argument

`NSLog(@"res: %.f", fabs(10)); //result 10` `NSLog(@"res: %.f", fabs(-10)); //result 10`

found here.

Problem

Found this bit of code... ``` if(fabs([tempPlacemark getCoordinate].latitude-latitude) < latDelta && fabs([tempPlacemark getCoordinate].longitude-longitude)<longDelta ) ... ``` refers to this in Math.h: ``` extern float fabsf(float); extern double fabs(double); extern long double fabsl(long double); ``` So what am I looking at?

Original source