19 static thread_local std::mt19937_64
Engine((std::random_device())());
20 std::uniform_int_distribution<uint64> Distribution(
21 std::numeric_limits<uint64>::lowest(),
22 std::numeric_limits<uint64>::max());
23 return Distribution(
Engine);
28 std::random_device RandomDevice;
29 std::uniform_int_distribution<int32> Distribution(
30 std::numeric_limits<int32>::lowest(),
31 std::numeric_limits<int32>::max());
32 return Distribution(RandomDevice);
38 std::numeric_limits<int32>::lowest(),
39 std::numeric_limits<int32>::max());
uint32 GetState() const
The engine's state, to continue its exact sequence elsewhere (a Multi-GPU secondary's mirror of a sen...
int32 GetUniformIntInRange(int32 Minimum, int32 Maximum)
static uint64 GenerateRandomId()
Generate a non-deterministic random id.
void SetState(uint32 State)
Continue from State, as GetState returned it; an impossible value is ignored.
static int32 GenerateRandomSeed()
Generate a non-deterministic random seed.
int32 GenerateSeed()
Generate a seed derived from previous seed.
uint32_t GetEngineState(const std::minstd_rand &engine)
The state of a minstd_rand: the value its next draw is computed from.
bool SetEngineState(std::minstd_rand &engine, uint32_t state)
Makes engine continue from state, as GetEngineState returned it.