Click or drag to resize

GeneratorRandomBoolGenerator Method (Single, Int32)

Makes a generator that returns random boolean values, true with the specified probability.

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static IGenerator<bool> RandomBoolGenerator(
	float probability,
	int seed
)

Parameters

probability
Type: SystemSingle
The probability of generating $(true).
seed
Type: SystemInt32
The seed to use for the random num ber generator.

Return Value

Type: IGeneratorBoolean
A new generator.
Exceptions
ExceptionCondition
ArgumentExceptionprobability does not lie between 0 and 1 (inclusive)
See Also