Library of Assembled Shared Sources
lass::num::RandomStandard Class Reference

Uses the C standard library function rand(). More...

#include <random.h>

Public Types

using result_type = int
 type of return value.
 
typedef int TValue
 type of return value.
 

Public Member Functions

result_type operator() () const
 draw a random number
 
result_type operator() (result_type supremum) const
 draw a random number remapped to range [0, supremum)
 

Static Public Member Functions

static constexpr result_type min ()
 minimum return value.
 
static constexpr result_type max ()
 maximum return value.
 

Detailed Description

Uses the C standard library function rand().

Note
this one isn't thread safe since state is stored externally.

Definition at line 71 of file random.h.

Member Typedef Documentation

◆ TValue

type of return value.

Deprecated

Definition at line 75 of file random.h.

Member Function Documentation

◆ operator()()

RandomStandard::TValue lass::num::RandomStandard::operator() ( result_type supremum) const
inline

draw a random number remapped to range [0, supremum)

Deprecated
this is A VERY BAD WAY TO DO IT!

Definition at line 78 of file random.inl.


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