19 #ifndef OPENXCOM_RNG_H
20 #define OPENXCOM_RNG_H
23 #define __STDC_LIMIT_MACROS
43 double generate(
double min,
double max);
45 double boxMuller(
double m = 0,
double s = 1);
58 std::random_shuffle(list.begin(), list.end(),
generateEx);
uint64_t getSeed()
Returns the current seed in use by the generator.
Definition: RNG.cpp:54
void setSeed(uint64_t n)
Changes the current seed in use by the generator.
Definition: RNG.cpp:63
int generateEx(int max)
Generates a random positive integer up to a number.
Definition: RNG.cpp:143
void shuffle(T &list)
Shuffles a list randomly.
Definition: RNG.h:56
int generate(int min, int max)
Generates a random integer number within a certain range.
Definition: RNG.cpp:74
double boxMuller(double m, double s)
Normal random variate generator.
Definition: RNG.cpp:98
bool percent(int value)
Generates a random percent chance of an event occuring, and returns the result.
Definition: RNG.cpp:133