Project Alice
Loading...
Searching...
No Matches
prng.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace sys {
4struct state;
5}
6
7namespace rng {
8
9struct random_pair {
12};
13
14uint64_t get_random(sys::state const& state, uint32_t value_in); // try to populate as many bits of value_in as you can
15random_pair get_random_pair(sys::state const& state, uint32_t value_in); // each call natively generates 128 random bits anyways
16uint64_t get_random(sys::state const& state, uint32_t value_in_hi, uint32_t value_in_lo);
17random_pair get_random_pair(sys::state const& state, uint32_t value_in_hi, uint32_t value_in_lo);
18uint32_t reduce(uint32_t value_in, uint32_t upper_bound);
19
20} // namespace rng
Definition: prng.cpp:6
random_pair get_random_pair(sys::state const &state, uint32_t value_in)
Definition: prng.cpp:26
uint32_t reduce(uint32_t value_in, uint32_t upper_bound)
Definition: prng.cpp:46
uint64_t get_random(sys::state const &state, uint32_t value_in)
Definition: prng.cpp:8
Definition: constants.hpp:4
uint uint32_t
ulong uint64_t
uint64_t low
Definition: prng.hpp:11
uint64_t high
Definition: prng.hpp:10