OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Static Public Member Functions | Static Public Attributes | List of all members
Misc::Rng Class Reference

#include <rng.hpp>

Collaboration diagram for Misc::Rng:

Static Public Member Functions

static void init ()
 seed the RNG More...
 
static float rollProbability ()
 return value in range [0.0f, 1.0f) <- note open upper range. More...
 
static float rollClosedProbability ()
 return value in range [0.0f, 1.0f] <- note closed upper range. More...
 
static int rollDice (int max)
 return value in range [0, max) <- note open upper range. More...
 
static int roll0to99 ()
 return value in range [0, 99] More...
 

Static Public Attributes

static std::mt19937 generator = std::mt19937()
 create a RNG More...
 

Member Function Documentation

void Misc::Rng::init ( )
static

seed the RNG

Here is the caller graph for this function:

static int Misc::Rng::roll0to99 ( )
inlinestatic

return value in range [0, 99]

Here is the call graph for this function:

Here is the caller graph for this function:

float Misc::Rng::rollClosedProbability ( )
static

return value in range [0.0f, 1.0f] <- note closed upper range.

Here is the caller graph for this function:

int Misc::Rng::rollDice ( int  max)
static

return value in range [0, max) <- note open upper range.

Here is the caller graph for this function:

float Misc::Rng::rollProbability ( )
static

return value in range [0.0f, 1.0f) <- note open upper range.

Here is the caller graph for this function:

Member Data Documentation

std::mt19937 Misc::Rng::generator = std::mt19937()
static

create a RNG


The documentation for this class was generated from the following files: