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
You may use those functions from tgmath.h.
#include ... double d = 1.5; double e = floor(d); // will choose the 64-bit version of 'floor' float f = 1.5f; float g = floor(f); // will choose the 32-bit version of 'floorf'.