>>=(_:_:)
static func >>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger
static func >>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger
import Swift
protocol FixedWidthInteger : BinaryInteger, LosslessStringConvertible where Self.Magnitude : FixedWidthInteger, Self.Magnitude : UnsignedInteger, Self.Stride : FixedWidthInteger, Self.Stride : SignedInteger
An integer type that uses a fixed size for every instance.
protocol BinaryInteger : CustomStringConvertible, Hashable, Numeric, Strideable where Self.Magnitude : BinaryInteger, Self.Magnitude == Self.Magnitude.Magnitude
An integer type with a binary representation.
static func >>= <RHS>(lhs: inout Self, rhs: RHS) where RHS : BinaryInteger
Stores the result of shifting a value’s binary representation the specified number of digits to the right in the left-hand-side variable.
init?(_ description: String)
Creates a new integer value from the given string.
init<T>(_ source: T) where T : BinaryFloatingPoint
Creates an integer from the given floating-point value, rounding toward zero. Any fractional part of the value passed as source
is removed.
init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol
Creates a new integer value from the given string and radix.
init(bigEndian value: Self)
Creates an integer from its big-endian representation, changing the byte order if necessary.
init<Other>(clamping source: Other) where Other : BinaryInteger
Creates a new instance with the representable value that’s closest to the given integer.
init?<T>(exactly source: T) where T : BinaryFloatingPoint
Creates an integer from the given floating-point value, if it can be represented exactly.
init(littleEndian value: Self)
Creates an integer from its little-endian representation, changing the byte order if necessary.
init<T>(truncatingIfNeeded source: T) where T : BinaryInteger
Creates a new instance from the bit pattern of the given instance by truncating or sign-extending if needed to fit this type.
static func random(in range: ClosedRange<Self>) -> Self
Returns a random value within the specified range.
static func random(in range: Range<Self>) -> Self
Returns a random value within the specified range.
static func random<T>(in range: ClosedRange<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator
Returns a random value within the specified range, using the given generator as a source for randomness.
static func random<T>(in range: Range<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator
Returns a random value within the specified range, using the given generator as a source for randomness.
var bigEndian: Self { get }
The big-endian representation of this integer.
var bitWidth: Int { get }
The number of bits in the binary representation of this value.
var littleEndian: Self { get }
The little-endian representation of this integer.
static func &* (lhs: Self, rhs: Self) -> Self
static func &*= (lhs: inout Self, rhs: Self)
Multiplies two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &+ (lhs: Self, rhs: Self) -> Self
Returns the sum of the two given values, wrapping the result in case of any overflow.
static func &+= (lhs: inout Self, rhs: Self)
Adds two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &- (lhs: Self, rhs: Self) -> Self
Returns the difference of the two given values, wrapping the result in case of any overflow.
static func &-= (lhs: inout Self, rhs: Self)
Subtracts the second value from the first and stores the difference in the left-hand-side variable, wrapping any overflow.
static func &<< <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger
Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width.
static func &<< (lhs: Self, rhs: Self) -> Self
Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width.
static func &<<= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger
Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.
static func &>> <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger
Returns the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width.
static func &>> (lhs: Self, rhs: Self) -> Self
Returns the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width.
static func &>>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger
Calculates the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.
static func << <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger
Returns the result of shifting a value’s binary representation the specified number of digits to the left.
static func <<= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger
static func >> <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger
Returns the result of shifting a value’s binary representation the specified number of digits to the right.
static func ~ (x: Self) -> Self
Returns the inverse of the bits set in the argument.
func multipliedFullWidth(by other: Self) -> (high: Self, low: Self.Magnitude)