Random.h 459 B

123456789101112131415161718
  1. #ifndef CORE_RANDOM_H
  2. #define CORE_RANDOM_H
  3. #include "core/Types.h"
  4. typedef struct {
  5. u32 data[25];
  6. size_t index;
  7. } CoreRandom;
  8. void coreInitRandom(CoreRandom* r, u32 seed);
  9. u32 coreRandomU32(CoreRandom* r, u32 min, u32 exclusiveMax);
  10. i32 coreRandomI32(CoreRandom* r, i32 min, i32 exclusiveMax);
  11. size_t coreRandomSize(CoreRandom* r, size_t min, size_t exclusiveMax);
  12. bool coreRandomBool(CoreRandom* r);
  13. float coreRandomFloat(CoreRandom* r);
  14. #endif