LCRNG

public struct LCRNG : RandomNumberGenerator

A Linear Congruential RandomNumberGenerator of pseudo-random values

Note

The LCRNG is independent. Values generated by one instance will have no effect on others

Note

The LCRNG is deterministic. Any instance initialized by the same seed will generate the same sequence of values

  • Initializes a LCRNG with the provided seed

    Any two LCRNG instances initialized by the same seed will independently generate the same sequence of pseudo-random

    Declaration

    Swift

    public init(seed: UInt64)

    Parameters

    seed

    The seed value which should be used to start the generator

  • Declaration

    Swift

    public mutating func next() -> UInt64