Skip to content

Instantly share code, notes, and snippets.

@PaulChana
Last active August 29, 2015 14:23
Show Gist options
  • Save PaulChana/6c5f1ef0f34d9d4c77ff to your computer and use it in GitHub Desktop.
Save PaulChana/6c5f1ef0f34d9d4c77ff to your computer and use it in GitHub Desktop.
C++11 Normal distribution random numbers
#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