Class RandomUtils
- Namespace
- OmegaEngine.Foundation
- Assembly
- OmegaEngine.Foundation.dll
Provides helper methods for creating different types of variables with random content.
public static class RandomUtils
- Inheritance
-
objectRandomUtils
Methods
GetRandomColor(Color, Color)
Get a random color value between limit1 and limit2
public static Color GetRandomColor(Color limit1, Color limit2)
Parameters
Returns
GetRandomDouble(double, double)
Get a random double value between min and max
public static double GetRandomDouble(double min, double max)
Parameters
Returns
GetRandomFloat(float, float)
Get a random float value between min and max
public static float GetRandomFloat(float min, float max)
Parameters
Returns
GetRandomInt(int, int)
Get random integer value
public static int GetRandomInt(int min, int max)
Parameters
Returns
GetRandomPointInsideSphere(float)
Get a random Vector3 value that lies within a sphere with the given radius
public static Vector3 GetRandomPointInsideSphere(float radius)
Parameters
radiusfloat
Returns
- Vector3
GetRandomVector3(Vector3, Vector3)
Get a random Vector3 value between min and max
public static Vector3 GetRandomVector3(Vector3 min, Vector3 max)
Parameters
minVector3minimum for each component
maxVector3maximum for each component
Returns
- Vector3