Last active
January 12, 2019 12:54
-
-
Save optozorax/c20c3266476801929232463d18db6b1d to your computer and use it in GitHub Desktop.
random by mt19937
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <random> | |
double random(void) { | |
static std::mt19937 generator(time(0)); | |
static std::uniform_real_distribution<double> distribution(0, 1); | |
return distribution(generator); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment