public struct RandomNumberSequence : Sequence

A sequence of pseudorandom numbers.

  • The seed value for random sequence generation.

    Declaration

    public let seed: UInt32?
  • Creates a sequence of pseudorandom numbers. If a seed is given, a random state will be created and initialized based on the seed value. Otherwise the global pseudorandom state, i.e. RandomState.global, will be used and updated. Use a seed if the use case requires the random sequence to be reproducible.

    Declaration

    public init(seed: UInt32? = nil)

    Parameters

    seed

    The seed value for random sequence generation.

  • Declaration

    public func makeIterator() -> AnyIterator<Int32>