kepam
2/8/2016 - 8:11 AM

Random generator

Random generator

#include <random>
// ...
std::mt19937 rng;
std::uniform_real_distribution<double> dist(0.0, 1.0);
auto number = dist(rng);