Class GLRandom
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Some convenience functions for random bools and integers.
[Version(1, 2, 0)]
public static class GLRandom
- Inheritance
-
GLRandom
- Inherited Members
Fields
- GlobalRandom
Globally accessible Random object for random calls
Methods
- Bool(float)
Generates a random bool, true with the given probability.
- GetRandom()
Gets a new random generator.
- GetRandom(int)
Gets a new random generator.
- RandomOffset(float, float)
Gives a random value within a given range centered around a given value.
- Range(int)
Generates a Random integer between 0 inclusive and the given max, exclusive.
- Range(int, int)
Generates a Random integer between the given min inclusive and the given max, exclusive.
- Range(float)
Generates a Random float between 0.0f inclusive and the given max
- Range(float, float)
Generates a Random float between the given min inclusive and the given max, exclusive.
- Sign()
Generates either -1.0f or 1.0f randomly.