AuroraRuntime/Source/RNG/AuMTwister.hpp

14 lines
329 B
C++
Raw Normal View History

2021-09-06 10:58:08 +00:00
#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;
2021-09-06 10:58:08 +00:00
};
MTRand MT_SeedRand(AuUInt32 seed);
AuUInt32 MT_NextLong(MTRand* rand);