3 ms·
Yes. It's double precision on 64-bit platforms and single precision on 32-bit. #if defined(__LP64__) && __LP64__ # define CGFLOAT_TYPE double # define CG
by _jsn 11y ago
Yes. It's double precision on 64-bit platforms and single precision on 32-bit.
#if defined(__LP64__) && __LP64__
# define CGFLOAT_TYPE double
# define CGFLOAT_IS_DOUBLE 1
# define CGFLOAT_MIN DBL_MIN
# define CGFLOAT_MAX DBL_MAX
#else
# define CGFLOAT_TYPE float
# define CGFLOAT_IS_DOUBLE 0
# define CGFLOAT_MIN FLT_MIN
# define CGFLOAT_MAX FLT_MAX
#endif
- nadohs 11y agoExactly, this is also pointed out in the struct definition in CoreGraphics for CGFloat. /// The native type used to store the CGFloat, which is Float on 32-bit architectures and Double on 64-bit architectures.