##// END OF EJS Templates
Implements "Variable creation" operation (1)...
Implements "Variable creation" operation (1) Defines properties that will be necessary for the operation: - the provider attached to the variable created - the metadata attached to the variable created

File last commit:

r1175:9f9ab053f00b
r1176:f9a3c30f94e2
Show More
FuzzingUtils.cpp
25 lines | 527 B | text/x-c | CppLexer
#include "FuzzingUtils.h"
RandomGenerator &RandomGenerator::instance()
{
static auto instance = RandomGenerator();
return instance;
}
double RandomGenerator::generateDouble(double min, double max)
{
std::uniform_real_distribution<double> dist{min, max};
return dist(m_Mt);
}
int RandomGenerator::generateInt(int min, int max)
{
std::uniform_int_distribution<int> dist{min, max};
return dist(m_Mt);
}
RandomGenerator::RandomGenerator()
{
std::random_device rd{};
m_Mt = std::mt19937{rd()};
}