Method Range
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Range(int)
Generates a random integer between 0 inclusive and the given max, exclusive.
public static int Range(int max)
Parameters
maxintThe exclusive upper bound.
Returns
- int
A random integer in [0,
max).
Range(int, int)
Generates a random integer between the given min inclusive and the given max, exclusive.
public static int Range(int min, int max)
Parameters
Returns
- int
A random integer in [
min,max).
Range(float)
Generates a random float between 0.0f inclusive and the given max.
public static float Range(float max)
Parameters
maxfloatThe exclusive upper bound.
Returns
- float
A random float in [0,
max).
Range(float, float)
Generates a random float between the given min inclusive and the given max, exclusive.
public static float Range(float min, float max)
Parameters
Returns
- float
A random float in [
min,max).