Extensions.RandomNext(IMemory, Int32, Int32, Nullable<Int32>) Method

Definition

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.

seed
Nullable<Int32>

user seed.

Returns

Random seed and value.

Applies to