AuroraRuntime/Source/RNG/mtwister.hpp
2021-10-24 11:19:47 +01:00

14 lines
329 B
C++

#pragma once
#define STATE_VECTOR_LENGTH 624
#define STATE_VECTOR_M 397 /* changes to STATE_VECTOR_LENGTH also require changes to this */
struct MTRand
{
AuUInt32 mt[STATE_VECTOR_LENGTH];
int index;
AuThreadPrimitives::SpinLock lock;
};
MTRand MT_SeedRand(AuUInt32 seed);
AuUInt32 MT_NextLong(MTRand* rand);