AuroraRuntime/Source/RNG/mtwister.hpp
2021-09-06 11:58:08 +01:00

14 lines
340 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;
Aurora::Threading::Primitives::SpinLock lock;
};
MTRand MT_SeedRand(AuUInt32 seed);
AuUInt32 MT_NextLong(MTRand* rand);