34 using namespace Nsound;
46 setSeed(static_cast<uint32>(time(NULL)));
53 #define MASK 0xffffffffUL
54 #define TAUSWORTHE(s,a,b,c,d) (((s & c) << d) & MASK) ^ ((((s << a) & MASK) ^ s) >> b)
71 return static_cast<int32>(
74 static_cast<float64>(max)));
84 float64 d = mag * (
static_cast<float64>(
get()) / 4294967296.0) + min;
118 #define LCG(n) ((69069 * n) & 0xffffffffUL)
RngTausworthe()
Default seed used is the number of seconds from unix epoch.
#define TAUSWORTHE(s, a, b, c, d)
RngTausworthe & operator=(const RngTausworthe &rhs)
assignment operator
void setSeed(Nsound::uint32 seed)
Set the seed to use.
uint32 get()
Get a random number.