| 
    Lunchbox
    1.10.0
    
   | 
 
A random number generator. More...
#include <rng.h>
 Inheritance diagram for lunchbox::RNG:
 Collaboration diagram for lunchbox::RNG:Public Member Functions | |
| LUNCHBOX_API | RNG () | 
| Construct a new random number generator.  More... | |
| LUNCHBOX_API | ~RNG () | 
| Destruct the random number generator.  More... | |
| LUNCHBOX_API void | reseed () | 
| Re-initialize the seed value for pseudo RNG's.  More... | |
| template<typename T > | |
| T | get () | 
| Generate a random number.  More... | |
| template<> | |
| float | get () | 
| template<> | |
| double | get () | 
| template<> | |
| bool | get () | 
Friends | |
| LUNCHBOX_API bool | init (const int argc, char **argv) | 
| Initialize the Lunchbox base classes.  More... | |
A random number generator.
Generates a set of random, or if not supported by the operating system, pseudo-random numbers. Each instance creates its own series of numbers.
Example:
| LUNCHBOX_API lunchbox::RNG::RNG | ( | ) | 
Construct a new random number generator.
| LUNCHBOX_API lunchbox::RNG::~RNG | ( | ) | 
Destruct the random number generator.
      
  | 
  inline | 
| LUNCHBOX_API void lunchbox::RNG::reseed | ( | ) | 
Re-initialize the seed value for pseudo RNG's.
      
  | 
  friend | 
Initialize the Lunchbox base classes.
exit() should be called independent of the return value of this function.
| argc | the command line argument count. | 
| argv | the command line argument values. |