12345678910111213141516171819202122232425262728 |
- #ifndef RANDOM_H
- #define RANDOM_H
- #include "utils/Types.h"
- struct Random final {
- typedef uint32 Seed;
- private:
- constexpr static int N = 25;
- constexpr static int M = 7;
- Seed data[N];
- int index;
- void update();
- public:
- Random(Seed seed);
- Random();
- int next();
- int next(int min, int inclusiveMax);
- float nextFloat();
- float nextFloat(float min, float exclusiveMax);
- };
- #endif
|