wavelength 1.0.0
Loading...
Searching...
No Matches
Rand.h
Go to the documentation of this file.
1#pragma once
2
10class Rand {
11public:
18 Rand(int seed);
19
26 void Seed(int seed);
27
28private:
29 enum { kTableSize = 256 };
30
31 int mIndex1;
32 int mIndex2;
33 int mTable[kTableSize];
34};
35
42void SeedRand(int seed);
void SeedRand(int seed)
Seed the shared generator.
Generator of pseudo-random numbers with a lagged Fibonacci sequence of 256 words.
Definition rand.h:8
Rand(int seed)
Seed a new generator.
static constexpr int kTableSize
Words of the state table.
Definition rand.h:11
void Seed(int seed)
Refill the table.