Navigation
API > API/Runtime > API/Runtime/uLangCore
Implements a thread-safe random number stream. Very bad quality in the lower bits. Don't use the modulus (%) operator.
| Name | CRandomStream |
| Type | class |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Misc/RandomStream.h |
| Include Path | #include "uLang/Common/Misc/RandomStream.h" |
Syntax
class CRandomStream
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
CRandomStream
(
int32_t Seed |
Default constructor. | uLang/Common/Misc/RandomStream.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| _Seed | uint32_t | Holds the current seed. | uLang/Common/Misc/RandomStream.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float FRandRange
(
float Min, |
uLang/Common/Misc/RandomStream.h | ||
void Initialize
(
int32_t Seed |
Initializes this random stream with the specified seed value. | uLang/Common/Misc/RandomStream.h | |
bool RandBool() |
uLang/Common/Misc/RandomStream.h | ||
int32_t RandRange
(
int32_t Min, |
uLang/Common/Misc/RandomStream.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void MutateSeed() |
Mutates the current seed into the next seed. | uLang/Common/Misc/RandomStream.h |