AuroraRuntime/Source/RNG/WELL.hpp

13 lines
297 B
C++
Raw Normal View History

2021-09-06 10:58:08 +00:00
#pragma once
struct WELLRand
{
AuUInt32 state[16];
int index;
AuThreadPrimitives::SpinLock lock;
2021-09-06 10:58:08 +00:00
};
WELLRand WELL_SeedRand(AuUInt32 seed);
WELLRand WELL_SeedRand64(AuUInt64 seed);
2021-09-06 10:58:08 +00:00
AuUInt32 WELL_NextLong(WELLRand* rand);
void WELL_NextBytes(WELLRand *rand, void *in, AuUInt32 length);