This commit is contained in:
romkazvo
2023-08-07 19:29:24 +08:00
commit 34d6c5d489
4832 changed files with 1389451 additions and 0 deletions

23
CrySoundSystem/RandGen.h Normal file
View File

@@ -0,0 +1,23 @@
#pragma once
#ifndef WIN64
typedef unsigned int uint32;
#endif
#define N (624) // length of state vector
class CPseudoRandGen
{
private:
uint32 state[N+1]; // state vector + 1 extra to not violate ANSI C
uint32 *next; // next random value is computed from here
int left; // can *next++ this many times before reloading
private:
uint32 Reload();
public:
CPseudoRandGen();
virtual ~CPseudoRandGen();
void Seed(uint32 seed);
uint32 Rand();
float Rand(float fMin, float fMax);
};