Table of Contents

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
RandomUtils
Inherited Members

Methods

GetRandomColor(Color, Color)

Get a random color value between limit1 and limit2

[Pure]
public static Color GetRandomColor(Color limit1, Color limit2)

Parameters

limit1 Color

One limit for the color values

limit2 Color

The other limit for the color values

Returns

Color

GetRandomDouble(float, float)

Get a random double value between min and max

[Pure]
public static double GetRandomDouble(float min, float max)

Parameters

min float

The minimum value

max float

The maximum value

Returns

double

GetRandomFloat(float, float)

Get a random float value between min and max

[Pure]
public static float GetRandomFloat(float min, float max)

Parameters

min float

The minimum value

max float

The maximum value

Returns

float

GetRandomInt(int, int)

Get random a integer value

[Pure]
public static int GetRandomInt(int min, int max)

Parameters

min int

The minimum value

max int

The maximum value

Returns

int

GetRandomVector3(Vector3, Vector3)

Get a random Vector3 value between min and max

[Pure]
public static Vector3 GetRandomVector3(Vector3 min, Vector3 max)

Parameters

min Vector3

minimum for each component

max Vector3

maximum for each component

Returns

Vector3