TLDR: How do I call standard floating point code in a way that compiles both 32 and 64 bit CGFloats without warnings?
CGFloat is defined as either double or fl
If you only need a few functions you can use this instead:
#if CGFLOAT_IS_DOUBLE #define roundCGFloat(x) round(x) #define floorCGFloat(x) floor(x) #define ceilCGFloat(x) ceil(x) #else #define roundCGFloat(x) roundf(x) #define floorCGFloat(x) floorf(x) #define ceilCGFloat(x) ceilf(x) #endif