DONT KNOW :D
This commit is contained in:
parent
4152ee0413
commit
8505032307
44 changed files with 1360 additions and 275 deletions
23
headers/VUtils/Random.h
Normal file
23
headers/VUtils/Random.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <random>
|
||||
|
||||
namespace VUtils {
|
||||
|
||||
class Random {
|
||||
public:
|
||||
static Random& the() {
|
||||
static Random _instance;
|
||||
return _instance;
|
||||
}
|
||||
Random();
|
||||
static double generate(double min, double max);
|
||||
double get(double min, double max);
|
||||
void setDist(double min, double max);
|
||||
double getFast();
|
||||
private:
|
||||
std::random_device m_rd;
|
||||
std::mt19937 m_mt;
|
||||
std::uniform_real_distribution<double> m_dist;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue