123456789101112131415161718192021222324252627 |
- #ifndef CORE_RANDOM_H
- #define CORE_RANDOM_H
- #include "core/Array.hpp"
- #include "core/Types.hpp"
- namespace Core {
- class Random final {
- Array<u32, 25> data;
- size_t index;
- public:
- Random(u32 seed);
- u32 nextU32();
- u32 nextU32(u32 min, u32 exclusiveMax);
- i32 nextI32(i32 min, i32 exclusiveMax);
- size_t nextSize(size_t min, size_t exclusiveMax);
- bool nextBool();
- float nextFloat();
- private:
- void update();
- };
- }
- #endif
|