MythTV  master
Namespaces | Typedefs | Functions
mythrandom.h File Reference
#include <cstdint>
#include <random>
Include dependency graph for mythrandom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 MythRandomStd
 

Typedefs

using MythRandomStd::MythRandomGenerator_32 = std::mt19937
 
using MythRandomStd::MythRandomGenerator_64 = std::mt19937_64
 

Functions

uint32_t MythRandomStd::MythRandom ()
 generate 32 random bits More...
 
uint64_t MythRandomStd::MythRandom64 ()
 generate 64 random bits More...
 
uint32_t MythRandomStd::MythRandom (uint32_t min, uint32_t max)
 generate a uniformly distributed random uint32_t in the closed interval [min, max]. More...
 
int MythRandomStd::MythRandomInt (int min, int max)
 generate a uniformly distributed random signed int in the closed interval [min, max]. More...
 
bool MythRandomStd::rand_bool (uint32_t chance=2)
 return a random bool with P(true) = 1/chance More...
 

Detailed Description

Convenience inline random number generator functions

Definition in file mythrandom.h.