Loading files
#pragma once
namespace System {
class Random {
public:
constexpr Random()
: state(0)
{};
void seed(uint32_t seed) {
state = seed;
}
uint32_t next(void) {
/* Linear congruential generator */
state = (22695477 * state + 1);
return state;
}
private:
uint32_t state;
};
}
443c35da9This file is pinned to the selected release. Download the original to open it in your design tool.