When talking about random numbers in the context of computer programming, we must be careful to distinguish between truly random numbers, which come from a physically non-deterministic source, and pseudo-random numbers, which come from an algorithm that deterministically produces a stream of "random-looking" numbers. Such an algorithm is called a pseudo-random number generator (PRNG). Every PRNG conceptually works the same way--it has some internal state, and it has some way for the user to ask for the next output. Every time we ask for the next output, the PRNG scrambles its internal state according to some deterministic algorithm and returns some piece of that state. Here's an example:
template<class T>
class SimplePRNG {
uint32_t state = 1;
public:
static constexpr T min() { return 0; }
...