Interface IProvideRandomValues
Assembly: Mars.Common.dll
Syntax
public interface IProvideRandomValues
Properties
|
Improve this Doc
View Source
IsThreadSafe
Declaration
bool IsThreadSafe { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
Next(Int32, Int32)
Returns a random integer that is within a specified range.
Declaration
int Next(int minValue, int maxValue)
Parameters
Type |
Name |
Description |
System.Int32 |
minValue |
The inclusive lower bound of the random number returned. |
System.Int32 |
maxValue |
The exclusive upper bound of the random number returned. maxValue must be greater than or equal
to minValue.
|
Returns
Type |
Description |
System.Int32 |
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.
|
|
Improve this Doc
View Source
NextFloat()
Generates a random float. Values returned are from 0.0 up to but not including 1.0.
Declaration
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
NextFloats(Span<Single>)
Fills the elements of a specified array of bytes with random numbers.
Declaration
void NextFloats(Span<float> buffer)
Parameters
Type |
Name |
Description |
System.Span<System.Single> |
buffer |
An array of bytes to contain random numbers. |
Extension Methods