Int
A signed integer value type.
Declaration
@frozen struct IntOverview
On 32-bit platforms, Int is the same size as Int32, and on 64-bit platforms, Int is the same size as Int64.
Topics
Converting Integers
init(_:)init(exactly:)init(clamping:)init(truncatingIfNeeded:)init(bitPattern:)init(exactly:)init(truncating:)
Converting Floating-Point Values
Converting with No Loss of Precision
Converting Strings
Creating a Random Integer
Performing Calculations
Performing Calculations with Overflow
addingReportingOverflow(_:)subtractingReportingOverflow(_:)multipliedReportingOverflow(by:)dividedReportingOverflow(by:)remainderReportingOverflow(dividingBy:)
Performing Double-Width Calculations
Finding the Sign and Magnitude
Accessing Numeric Constants
Working with Byte Order
Working with Binary Representation
Working with Memory Addresses
Encoding and Decoding Values
Describing an Integer
Infrequently Used Functionality
Deprecated
SIMD-Supporting Types
Int.SIMDMaskScalarInt.SIMD2StorageInt.SIMD4StorageInt.SIMD8StorageInt.SIMD16StorageInt.SIMD32StorageInt.SIMD64Storage
Operators
Type Aliases
Type Properties
Default Implementations
AdditiveArithmetic ImplementationsAtomicRepresentable ImplementationsBinaryInteger ImplementationsCodingKeyRepresentable ImplementationsComparable ImplementationsCustomReflectable ImplementationsDecodable ImplementationsEncodable ImplementationsEquatable ImplementationsExpressibleByIntegerLiteral ImplementationsFixedWidthInteger ImplementationsHashable ImplementationsSIMDScalar ImplementationsSignedInteger ImplementationsSignedNumeric ImplementationsStrideable Implementations