| 12345678910111213141516171819202122232425 |
- module;
- export module Core.Random;
- import Core.Array;
- export 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();
- };
- }
|