Last active
August 29, 2015 14:23
-
-
Save PaulChana/6c5f1ef0f34d9d4c77ff to your computer and use it in GitHub Desktop.
C++11 Normal distribution random numbers
This file contains hidden or 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> | |
std::mt19937 generator; | |
double mean = 0.0; | |
double std = 1.0; | |
std::normal_distribution<double> normal(mean, std); | |
const double normalNumber = normal(generator); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment