Provides helper methods for creating different types of variables with random content.
More...
|
static int | GetRandomInt (int min, int max) |
| Get random a integer value More...
|
|
static float | GetRandomFloat (float min, float max) |
| Get a random float value between min and max More...
|
|
static double | GetRandomFloatRange (double min, double max, double step) |
| Get a random double value between min and max with steps of step More...
|
|
static double | GetRandomDouble (float min, float max) |
| Get a random double value between min and max More...
|
|
static double | GetRandomDouble (double min, double max, double step) |
| Get a random double value between min and max with steps of step More...
|
|
static byte | GetRandomByte (byte min, byte max) |
| Get a random byte value between min and max More...
|
|
static Vector2 | GetRandomVector2 (Vector2 min, Vector2 max) |
| Get a random Vector2 value between min and max More...
|
|
static Vector3 | GetRandomVector3 (Vector3 min, Vector3 max) |
| Get a random Vector3 value between min and max More...
|
|
static Color | GetRandomColor (Color limit1, Color limit2) |
| Get a random color value between limit1 and limit2 More...
|
|
Provides helper methods for creating different types of variables with random content.
◆ GetRandomByte()
static byte OmegaEngine.RandomUtils.GetRandomByte |
( |
byte |
min, |
|
|
byte |
max |
|
) |
| |
|
static |
Get a random byte value between min and max
- Parameters
-
min | The minimum value |
max | The maximum value |
◆ GetRandomColor()
static Color OmegaEngine.RandomUtils.GetRandomColor |
( |
Color |
limit1, |
|
|
Color |
limit2 |
|
) |
| |
|
static |
Get a random color value between limit1 and limit2
- Parameters
-
limit1 | One limit for the color values |
limit2 | The other limit for the color values |
◆ GetRandomDouble() [1/2]
static double OmegaEngine.RandomUtils.GetRandomDouble |
( |
float |
min, |
|
|
float |
max |
|
) |
| |
|
static |
Get a random double value between min and max
- Parameters
-
min | The minimum value |
max | The maximum value |
◆ GetRandomDouble() [2/2]
static double OmegaEngine.RandomUtils.GetRandomDouble |
( |
double |
min, |
|
|
double |
max, |
|
|
double |
step |
|
) |
| |
|
static |
Get a random double value between min and max with steps of step
- Parameters
-
min | The minimum value |
max | The maximum value |
step | The step size (all returned values are multiples of this) |
- Returns
- A random multiple of step between min and max .
◆ GetRandomFloat()
static float OmegaEngine.RandomUtils.GetRandomFloat |
( |
float |
min, |
|
|
float |
max |
|
) |
| |
|
static |
Get a random float value between min and max
- Parameters
-
min | The minimum value |
max | The maximum value |
◆ GetRandomFloatRange()
static double OmegaEngine.RandomUtils.GetRandomFloatRange |
( |
double |
min, |
|
|
double |
max, |
|
|
double |
step |
|
) |
| |
|
static |
Get a random double value between min and max with steps of step
- Parameters
-
min | The minimum value |
max | The maximum value |
step | The step size (all returned values are multiples of this) |
- Returns
- A random multiple of step between min and max .
◆ GetRandomInt()
static int OmegaEngine.RandomUtils.GetRandomInt |
( |
int |
min, |
|
|
int |
max |
|
) |
| |
|
static |
Get random a integer value
- Parameters
-
min | The minimum value |
max | The maximum value |
◆ GetRandomVector2()
static Vector2 OmegaEngine.RandomUtils.GetRandomVector2 |
( |
Vector2 |
min, |
|
|
Vector2 |
max |
|
) |
| |
|
static |
Get a random Vector2 value between min and max
- Parameters
-
min | minimum for each component |
max | maximum for each component |
◆ GetRandomVector3()
static Vector3 OmegaEngine.RandomUtils.GetRandomVector3 |
( |
Vector3 |
min, |
|
|
Vector3 |
max |
|
) |
| |
|
static |
Get a random Vector3 value between min and max
- Parameters
-
min | minimum for each component |
max | maximum for each component |
The documentation for this class was generated from the following file:
- OmegaEngine/RandomUtils.cs