1234567891011121314151617181920212223242526272829 |
- #ifndef CORE_RANDOM_HPP
- #define CORE_RANDOM_HPP
- #include "core/data/Array.hpp"
- #include "core/utils/Types.hpp"
- namespace Core {
- struct Random final {
- using Seed = u32;
- private:
- Array<Seed, 25> data;
- int index;
- public:
- Random(Seed seed);
- int next();
- int next(int min, int inclusiveMax);
- bool nextBool();
- float nextFloat();
- float nextFloat(float min, float exclusiveMax);
- private:
- void update();
- };
- }
- #endif
|