| 1234567891011121314151617181920212223 |
- export module Core.Random;
- import Core.Array;
- export namespace Core {
- class Random final {
- Array<u32, 25> data;
- size_t index;
- public:
- Random(u32 seed) noexcept;
- u32 nextU32() noexcept;
- u32 nextU32(u32 min, u32 exclusiveMax) noexcept;
- i32 nextI32(i32 min, i32 exclusiveMax) noexcept;
- size_t nextSize(size_t min, size_t exclusiveMax) noexcept;
- bool nextBool() noexcept;
- float nextFloat() noexcept;
- private:
- void update() noexcept;
- };
- }
|