Hacker News new | ask | show | jobs
by _jsn 3903 days 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
1 comments

Exactly, 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.