Extensions.RandomNext(IMemory, Int32, Int32, Nullable<Int32>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generator random seed and value from properties. If value is not null, the mock random value result would be: min + (value % (max - min)). Else if seed is not null, the seed of the random would be fixed.
public static int RandomNext (this AdaptiveExpressions.Memory.IMemory memory, int min, int max, int? seed = default);
static member RandomNext : AdaptiveExpressions.Memory.IMemory * int * int * Nullable<int> -> int
<Extension()>
Public Function RandomNext (memory As IMemory, min As Integer, max As Integer, Optional seed As Nullable(Of Integer) = Nothing) As Integer
Parameters
- memory
- IMemory
memory state.
- min
- Int32
The inclusive lower bound of the random number returned.
- max
- Int32
The exclusive upper bound of the random number returned. max must be greater than or equal to min.
Returns
Random seed and value.