Bool

struct Bool
  • A value a Randomizer can return that will result in false.

    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 Randomizer can return that will result in true.

    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

    randomizer

    The randomizer.

  • Returns true if the left value is less than the right.

    Declaration

    Swift

    public static func < (lhs: Bool, rhs: Bool) -> Bool

    Parameters

    lhs

    A value.

    rhs

    Another value.