mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-23 21:03:37 +00:00
24 lines
455 B
C++
24 lines
455 B
C++
#pragma once
|
|
|
|
class Random {
|
|
private:
|
|
int64_t seed;
|
|
bool haveNextNextGaussian;
|
|
double nextNextGaussian;
|
|
|
|
protected:
|
|
int next(int bits);
|
|
|
|
public:
|
|
Random();
|
|
Random(int64_t seed);
|
|
void setSeed(int64_t s);
|
|
void nextBytes(uint8_t* bytes, unsigned int count);
|
|
double nextDouble();
|
|
double nextGaussian();
|
|
int nextInt();
|
|
int nextInt(int to);
|
|
float nextFloat();
|
|
int64_t nextLong();
|
|
bool nextBoolean();
|
|
}; |