/ fm / liveswitch / LockedRandomizer
Class: LockedRandomizer
fm.liveswitch.LockedRandomizer
Thread-safe class providing access to a single [[fm.liveswitch.lockedRandomizer.Randomizer]].
Table of contents
Constructors
Methods
Constructors
constructor
+ new LockedRandomizer(): LockedRandomizer
Returns: LockedRandomizer
Methods
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:9
next
▸ Static
next(): number
Returns a nonnegative random number.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:22
▸ Static
next(maxValue
: number): number
Returns a nonnegative random number less than the specified maximum.
Parameters:
Name | Type | Description |
---|---|---|
maxValue |
number | The maximum value (exclusive). |
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:29
▸ Static
next(minValue
: number, maxValue
: number): number
Returns a random number within a specified range.
Parameters:
Name | Type | Description |
---|---|---|
minValue |
number | The minimum value (inclusive). |
maxValue |
number | The maximum value (exclusive). |
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:37
nextBytes
▸ Static
nextBytes(buffer
: Uint8Array): void
Fills the elements of a specified array of bytes with random numbers.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Uint8Array | The array of bytes to fill. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:59
nextDouble
▸ Static
nextDouble(): number
Returns a random number between 0.0 and 1.0.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:72
nextLong
▸ Static
nextLong(): number
Returns a nonnegative random number.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:85
randomString
▸ Static
randomString(size
: number): string
Generates a random string of a specified size.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | The size of the output string. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/LockedRandomizer.ts:99