1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00
Beef/BeefySysLib/util/MTRand.h
Brian Fiete 2f89450493 MTRand
2025-01-10 14:03:31 -08:00

28 lines
No EOL
465 B
C++

#pragma once
#include "Common.h"
NS_BF_BEGIN;
#define MTRAND_N 624
class MTRand
{
unsigned long mt[MTRAND_N]; /* the array for the state vector */
int mti;
public:
MTRand(const std::string& theSerialData);
MTRand(unsigned long seed);
MTRand();
void SRand(const std::string& theSerialData);
void SRand(unsigned long seed);
unsigned long Next();
unsigned long Next(unsigned long range);
float Next(float range);
String Serialize();
};
NS_BF_END