project64/Source/Common/Random.h

20 lines
362 B
C
Raw Permalink Normal View History

// Defines the CRandom class
// This class implements the Lehmer Random Number Generator
#pragma once
2021-04-12 06:34:26 +00:00
#include <stdint.h>
class CRandom
{
public:
CRandom();
CRandom(uint32_t seed_value);
uint32_t next();
uint32_t get_state();
void set_state(uint32_t state_value);
protected:
uint32_t randomizer(uint32_t val);
2017-10-18 05:16:30 +00:00
uint32_t m_state;
};