Nugget
|
#include <EASTLTest.h>
Protected Attributes | |
uint64_t | mnSeed |
Implements a basic random number generator for EASTL unit tests. It's not intended to be a robust random number generator (though it is decent), but rather is present so the unit tests can have a portable random number generator they can rely on being present.
Example usage: EASTLTest_Rand rng; eastl_size_t x = rng(); // Generate value in range of 0, 0xffffffff eastl_ssize_t y = rng.Rand(1000); // Generate value in range of [0, 1000) eastl_ssize_t z = rng.RandRange(-50, +30); // Generate value in range of [-50, +30)
Example usage in the random_shuffle algorithm: EASTLTest_Rand rng; random_shuffle(first, last, rnd);