Table of Contents

Method UniformRandomInt

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

UniformRandomInt(int)

Makes a generator that generates integers uniformly distributed between 0 (included) and the specified limit (excluded).

public static IGenerator<int> UniformRandomInt(int upperLimitExcluded)

Parameters

upperLimitExcluded int

The upper limit (excluded).

Returns

IGenerator<int>

IGenerator<System.Int32>.

Exceptions

ArgumentOutOfRangeException

upperLimitExcludedis not positive.

UniformRandomInt(int, int)

Makes a generator hat generates integers uniformly distributed between 0 (included) and the specified limit (excluded).

public static IGenerator<int> UniformRandomInt(int upperLimitExcluded, int seed)

Parameters

upperLimitExcluded int

The upper limit (excluded).

seed int

The seed to use for the random number generator.

Returns

IGenerator<int>

A new generator.

Exceptions

ArgumentOutOfRangeException

upperLimitExcludedis not positive.