 | 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
Syntaxpublic 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:
IGeneratorBooleanA new generator.
Exceptions| Exception | Condition |
|---|
| ArgumentException | probability does not lie between 0 and 1 (inclusive) |
See Also