Int

public extension Int
  • Returns whether number is even

    Declaration

    Swift

    var isEven: Bool { get }
  • Returns whether number is odd

    Declaration

    Swift

    var isOdd: Bool { get }
  • Returns true if value end on 1.

    Declaration

    Swift

    var isSingular: Bool { get }

As

  • Returns self as UInt

    Declaration

    Swift

    var asUInt: UInt? { get }
  • Returns self as CGFloat

    Declaration

    Swift

    var asCGFloat: CGFloat { get }
  • Returns self as Double

    Declaration

    Swift

    var asDouble: Double { get }
  • Returns self as Float

    Declaration

    Swift

    var asFloat: Float { get }
  • Returns self as String

    Declaration

    Swift

    var asString: String { get }
  • Returns self as HEX String in a format like 0xAABB11

    Declaration

    Swift

    var asHexString: String { get }
  • Returns self as TimeInterval

    Declaration

    Swift

    var asTimeInterval: TimeInterval { get }