UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
uLang::CRandomStream Class Reference

#include <RandomStream.h>

Public Member Functions

 CRandomStream (int32_t Seed=0)
 
void Initialize (int32_t Seed)
 
int32_t RandRange (int32_t Min, int32_t Max)
 
float FRandRange (float Min, float Max)
 
bool RandBool ()
 

Protected Member Functions

void MutateSeed ()
 

Detailed Description

Implements a thread-safe random number stream. Very bad quality in the lower bits. Don't use the modulus (%) operator.

Constructor & Destructor Documentation

◆ CRandomStream()

uLang::CRandomStream::CRandomStream ( int32_t  Seed = 0)
inline

Default constructor.

Member Function Documentation

◆ FRandRange()

float uLang::CRandomStream::FRandRange ( float  Min,
float  Max 
)
inline
Returns
A random number >= Min and < Max

◆ Initialize()

void uLang::CRandomStream::Initialize ( int32_t  Seed)
inline

Initializes this random stream with the specified seed value.

Parameters
SeedThe seed value.

◆ MutateSeed()

void uLang::CRandomStream::MutateSeed ( )
inlineprotected

Mutates the current seed into the next seed.

◆ RandBool()

bool uLang::CRandomStream::RandBool ( )
inline
Returns
A random boolean

◆ RandRange()

int32_t uLang::CRandomStream::RandRange ( int32_t  Min,
int32_t  Max 
)
inline
Returns
A random number >= Min and <= Max

The documentation for this class was generated from the following file: