ThreadSafeFastRandom
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Next | 3 | Returns a non-negative random integer. |
| NextFloat | 1 | Generates a random float. |
| NextFloats | 1 | Fills the elements of a specified array of bytes with random numbers. |
03 Members
Returns a non-negative random integer.
A 32-bit signed integer that is greater than or equal to 0 and less than System.Int32.MaxValue.
Int32)Returns a non-negative random integer that is less than the specified maximum.
| Name | Type | Description |
|---|---|---|
maxValue | Int32 | The exclusive upper bound of the random number to be generated. maxValue must be greater than or equal to 0. |
A 32-bit signed integer that is greater than or equal to 0, and less than maxValue; that is, the range of return values ordinarily includes 0 but not maxValue. However, if maxValue equals 0, maxValue is returned.
Int32, Int32)Returns a random integer that is within a specified range.
| Name | Type | Description |
|---|---|---|
minValue | Int32 | The inclusive lower bound of the random number returned. |
maxValue | Int32 | The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue. |
A 32-bit signed integer greater than or equal to minValue and less than maxValue; that is, the range of return values includes minValue but not maxValue. If minValue equals maxValue, minValue is returned.
Generates a random float. Values returned are from 0.0 up to but not including 1.0.
Double())Fills the elements of a specified array of bytes with random numbers.
| Name | Type | Description |
|---|---|---|
buffer | Double() | An array of bytes to contain random numbers. |