You.i Engine
CYIRandom Class Reference

#include <utility/YiRandom.h>

Static Public Member Functions

static uint32_t GenerateRandomNumber ()
 
static uint32_t GenerateSecureRandomNumber ()
 

Member Function Documentation

◆ GenerateRandomNumber()

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.

◆ GenerateSecureRandomNumber()

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: