AnyRandomNumberGenerator

public struct AnyRandomNumberGenerator : RandomNumberGenerator

A type-erased random number generator.

The AnyRandomNumberGenerator type forwards random number generating operations to an underlying random number generator, hiding its specific underlying type.

  • Declaration

    public init(_ rng: RandomNumberGenerator)

    Parameters

    rng

    A random number generator.

  • Declaration

    public mutating mutating func next() -> UInt64