123456789101112131415161718 |
- #ifndef CORE_RANDOM_H
- #define CORE_RANDOM_H
- #include "core/Types.h"
- typedef struct {
- u32 data[25];
- size_t index;
- } Random;
- void initRandom(Random* r, u32 seed);
- u32 randomU32(Random* r, u32 min, u32 exclusiveMax);
- i32 randomI32(Random* r, i32 min, i32 exclusiveMax);
- size_t randomSize(Random* r, size_t min, size_t exclusiveMax);
- bool randomBool(Random* r);
- float randomFloat(Random* r);
- #endif
|