29 #ifndef HU_VARADIISTVAN_SCPL_PSEUDORANDOM_H
30 #define HU_VARADIISTVAN_SCPL_PSEUDORANDOM_H
40 namespace hu {
namespace varadiistvan {
namespace scpl {
59 static const uint32_t
MAX = (1<<31);
108 double nextDouble(
double to = 1.0,
double from= 0.0);
152 return from +
static_cast<unsigned>(
static_cast<double>(to - from) *
next()
153 /
static_cast<double>(
MAX));
160 return from + (to-from) *
next() /
static_cast<double>(
MAX);
static const size_t vectorSize
uint32_t vector[vectorSize]
static const size_t numDiscarded
void initialize(uint32_t seed)
double nextDouble(double to=1.0, double from=0.0)
static const uint32_t MAX
unsigned nextUnsigned(unsigned to=MAX, unsigned from=0)