UInt32

struct UInt32 : FixedWidthInteger, UnsignedInteger
  • Returns the next power of two unless that would overflow, in which case UInt32.max (on 64-bit systems) or Int32.max (on 32-bit systems) is returned. The returned value is always safe to be cast to Int and passed to malloc on all platforms.

    Declaration

    Swift

    public func nextPowerOf2ClampedToMax() -> UInt32