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
- upperLimitExcludedint
- 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
- upperLimitExcludedint
- The upper limit (excluded). 
- seedint
- The seed to use for the random number generator. 
Returns
- IGenerator<int>
- A new generator. 
Exceptions
- ArgumentOutOfRangeException
- upperLimitExcludedis not positive.