Also included is an additive lagged fibonacci generator that should is
very similar to EQ's. Also added BIASED_INT_DIST in case someone wants
to use "bad" int distribution to more closely match EQ as well.
An option to set a custom engine (just in case people would like to play
with other std engines) is available.
There is also support for GCC's SIMD accelerated extension to std random
engines.
All these options are hidden behind advanced options in CMake since
they're rather advanced knobs.
This is just a wrapper to std::shuffle since it requires a random
engine and ours lives in a class
Must pass random access iterators (array, vector, deque, etc)
ex:
std::vector<int> v;
/* init ... */
random.Shuffle(v.begin(), v.end());
Added class EQEmu::Random
Functions:
EQEmu::Random::Int(int low, int high)
EQEmu::Random::Real(double low, double high)
EQEmu::Random::Roll(int required)
EQEmu::Random::Roll(double required)
EQEmu::Random::Reseed()
For zone, you will access the random object through the zone object
ex.
zone->random.Int(0, 100);
Int returns a random int between low and high
Real returns a random double between low and high
Roll(int) returns true if Int(0, 99) < required is true
Roll(double) returns true if Real(0.0, 1.0) <= required is true