blob: bc6a173b4297c98ea66606fe7a36c573584c42ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef RANDOM_H
#define RANDOM_H
#include <random>
// TODO think more about
class Random {
public:
Random(int seed = 0) : m_gen(seed), m_dist(0, 1) {}
inline double getDouble() {
return m_dist(m_gen);
};
private:
std::minstd_rand m_gen;
std::uniform_real_distribution<double> m_dist;
};
#endif
|