Skip to main content

Module rng

Module rng 

Source
Expand description

Pluggable PRNG for story randomization.

Two built-in implementations:

  • FastRng: xorshift32, the default for production use.
  • DotNetRng: port of .NET System.Random (Knuth subtractive generator), used for corpus tests requiring exact match with the reference C# runtime.

Structs§

DotNetRng
Port of .NET System.Random (Knuth subtractive generator).
FastRng
Xorshift32-based PRNG. Fast, decent distribution, not .NET-compatible.

Traits§

StoryRng
Trait for story-level random number generation.