Initializer
init(bitPattern:)
Creates a UInt256 with the same bit pattern as a signed Int256 value.
- iOS 18.0+
- macCatalyst 18.0+
- macOS 15.0+
- tvOS 18.0+
- visionOS 2.0+
- watchOS 11.0+
init(bitPattern source: Int256)
Parameters
-
source
-
The signed value whose bits are reinterpreted.
Discussion
Preserves the raw 256 bits verbatim; negative Int256 values become large unsigned values via two’s-complement interpretation. Matches the Swift standard-library convention (e.g. UInt64(bitPattern: Int64)).