CryEngine.Random

Static Public Member Functions

static float Range (float minValue, float maxValue)
Returns a random float that is greater or equal to minValue and less than maxValue . More...
static int Range (int minValue, int maxValue)
Returns a random integer that is greater or equal to minValue and less than maxValue . More...
static int Next (int minValue, int maxValue)
Returns a random integer that is greater or equal to minValue and less than maxValue . More...
static int Next (int maxValue)
Returns a random integer that is greater or equal to 0 and less than maxValue . More...
static int Next ()
Returns a non-negative random integer. More...

Properties

static float Value [get]
Get a float that is greater than or equal to 0.0, and less than 1.0. More...

Member Function Documentation

◆ Next() [1/3]

static int CryEngine.Random.Next ( int minValue,
int maxValue
)
inline
static

Returns a random integer that is greater or equal to minValue and less than maxValue .

Returns
A 32-bit signed integer greater than or equal to minValue and less than maxValue ; that is, the range of return values includes minValue but not maxValue . If minValue equals maxValue , minValue is returned.
Parameters
minValueThe inclusive lower bound of the random number returned.
maxValueThe exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue .

◆ Next() [2/3]

static int CryEngine.Random.Next ( int maxValue)
inline
static

Returns a random integer that is greater or equal to 0 and less than maxValue .

Returns
A 32-bit signed integer that is greater than or equal to 0, and less than maxValue ; that is, the range of return values ordinarily includes 0 but not maxValue . However, if maxValue equals 0, maxValue is returned.
Parameters
maxValueMax value.

◆ Next() [3/3]

static int CryEngine.Random.Next ( )
inline
static

Returns a non-negative random integer.

Returns
A 32-bit signed integer that is greater than or equal to 0 and less than int.MaxValue.

◆ Range() [1/2]

static float CryEngine.Random.Range ( float minValue,
float maxValue
)
inline
static

Returns a random float that is greater or equal to minValue and less than maxValue .

Returns
The random value.
Parameters
minValueThe inclusive lower bound of the random value returned.
maxValueThe exclusive upper bound of the random value returned. maxValue must be greater than or equal to minValue .

◆ Range() [2/2]

static int CryEngine.Random.Range ( int minValue,
int maxValue
)
inline
static

Returns a random integer that is greater or equal to minValue and less than maxValue .

Returns
A 32-bit signed integer greater than or equal to minValue and less than maxValue ; that is, the range of return values includes minValue but not maxValue . If minValue equals maxValue , minValue is returned.
Parameters
minValueThe inclusive lower bound of the random number returned.
maxValueThe exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue .

Property Documentation

◆ Value

float CryEngine.Random.Value
static
get

Get a float that is greater than or equal to 0.0, and less than 1.0.

The random value.