I made this method
+ (CGFloat) round: (CGFloat)f { int a = f; CGFloat b = a; return b; }
It works as expected but it only round
A CGFloat is typedef'd to either a double or a float, so you can round them like any other real type:
CGFloat
double
float
CGFloat round(CGFloat aFloat) { return (int)(aFloat + 0.5); }
Note that while this works with floats small enough to carry a fraction, it may act weird on large values.