#include <utility/YiRandom.h>
| static uint32_t CYIRandom::GenerateRandomNumber |
( |
| ) |
|
|
static |
Generates a random number using the Xorshift algorithm.
This algorithm is a faster alternative to the Mersenne-Twister,
and has better distribution.
This is not cryptographically secure. For a secure alternative,
see GenerateSecureRandomNumber().
- Warning
- Like the STL's std::rand(), this function is not re-entrant or thread-safe.
| static uint32_t CYIRandom::GenerateSecureRandomNumber |
( |
| ) |
|
|
static |
Generates a secure random number.
If you want to favor speed over security or distribution of results,
see GenerateRandomNumber().
- Warning
- Like the STL's std::rand(), this function is not re-entrant or thread-safe.
The documentation for this class was generated from the following file: