aboutsummaryrefslogtreecommitdiff
path: root/backend/RNG.h
blob: ded337c0e252deff2bad08420f38e2437b60d6ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <random>

class RNG {
public:
	static RNG & get();

public:
	int rand_int(const int upper);
	int rand_int(const int lower, const int upper);
	double rand_double();
	double rand_double(const double lower, const double upper);
	bool rand_bool();

private:
	RNG();

private:
	std::random_device dev;
	std::mt19937 rng;
};