Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Math/RandomStream.h |
Include |
#include "Math/RandomStream.h" |
struct FRandomStream
Implements a thread-safe SRand based RNG.
Very bad quality in the lower bits. Don't use the modulus (%) operator.
Name | Description | |
---|---|---|
|
FRandomStream() |
Default constructor. The seed should be set prior to use. |
|
FRandomStream ( |
Creates and initializes a new random stream from the specified seed value. |
|
FRandomStream ( |
Creates and initializes a new random stream from the specified name. |
Name | Description | ||
---|---|---|---|
|
ExportTextItem ( |
Exports the RandomStreams value to a string. |
|
|
float |
FRand() |
Mirrors the random number API in FMath |
|
FVector::FRe... |
FRandRange ( |
Helper function for rand implementations. |
|
GenerateNewSeed() |
Generates a new random seed. |
|
|
GetCurrentSeed() |
Gets the current seed. |
|
|
float |
GetFraction() |
Returns a random float number in the range [0, 1). |
|
GetInitialSeed() |
||
|
GetUnitVector() |
Returns a random vector of unit size. |
|
|
GetUnsignedInt() |
Returns a random number between 0 and MAXUINT. |
|
|
Initialize ( |
Initializes this random stream using the specified name. |
|
|
Initialize ( |
Initializes this random stream with the specified seed value. |
|
|
MutateSeed() |
Mutates the current seed into the next seed. |
|
|
RandHelper ( |
Helper function for rand implementations. |
|
|
RandPointInBox ( |
||
|
RandRange |
Helper function for rand implementations. |
|
|
Reset() |
Resets this random stream to the initial seed value. |
|
|
ToString() |
Get a textual representation of the RandomStream. |
|
|
VRand() |
Returns a random vector of unit size. |
|
|
VRandCone ( |
Returns a random unit vector, uniformly distributed, within the specified cone. |
|
|
VRandCone ( |
Returns a random unit vector, uniformly distributed, within the specified cone. |