Click or drag to resize

GeneratorChooseUniformRandomTSource Method (IListTSource, Int32)

Make a generator that randomly generates elements from a list. Can be seeded.

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static IGenerator<TSource> ChooseUniformRandom<TSource>(
	IList<TSource> list,
	int seed
)

Parameters

list
Type: System.Collections.GenericIListTSource
The source list.
seed
Type: SystemInt32
The seed of the random number generator to use.

Type Parameters

TSource
The type of elements to generate.

Return Value

Type: IGeneratorTSource
A new generator.
Exceptions
ExceptionCondition
ArgumentNullExceptionlist
ArgumentExceptionList must have at least one element;list
See Also