Bool
struct Bool
-
A value a
Randomizercan return that will result infalse.For example:
let alternating = CyclicalNumberGenerator([ Bool.falseRandomizerValue, Bool.trueRandomizerValue ]) // Booleans created using... _ = Bool(fromRandomizer: alternating) // ...now alternate between “false” and “true”.Declaration
Swift
public static let falseRandomizerValue: UInt64 = 0 -
A value a
Randomizercan return that will result intrue.For example:
let alternating = CyclicalNumberGenerator([ Bool.falseRandomizerValue, Bool.trueRandomizerValue ]) // Booleans created using... _ = Bool(fromRandomizer: alternating) // ...now alternate between “false” and “true”.Declaration
Swift
public static let trueRandomizerValue: UInt64 = randomizationBit -
Returns a random Boolean value.
Declaration
Swift
public static func random() -> Bool -
Creates a random Boolean value derived from a particular randomizer.
Declaration
Swift
public init(fromRandomizer randomizer: Randomizer)Parameters
randomizerThe randomizer.
-
Returns
trueif the left value is less than the right.Declaration
Swift
public static func < (lhs: Bool, rhs: Bool) -> BoolParameters
lhsA value.
rhsAnother value.
View on GitHub
Bool Extension Reference