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 othersNote
The LCRNG is deterministic. Any instance initialized by the same seed will generate the same sequence of values
-
Initializes a
LCRNG
with the provided seedAny two
LCRNG
instances initialized by the same seed will independently generate the same sequence of pseudo-randomDeclaration
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