RandomNumberGenerator.h
1 #pragma once
2 #include "stormancer/BuildConfig.h"
3 #include <random>
4 
5 namespace Stormancer
6 {
15  {
16  public:
21 
28  int getInt(int lowerBound, int upperBound);
29 
34  int getInt();
35 
41 
42  private:
43  std::default_random_engine _randomEngine;
44  };
45 }
int getInt()
Get a random integer between 0 and MAX_INT.
RandomNumberGenerator()
Construct a RandomNumberGenerator, seeding its random engine with a random number from the system's r...
static RandomNumberGenerator & getThreadLocal()
Get a static thread-local RandomNumberGenerator instance.
A pseudo-random number generator. Uses the C++11 default random engine.
Definition: RandomNumberGenerator.h:14