Table of Contents

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

max int

The 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

min int

The inclusive lower bound.

max int

The exclusive upper bound.

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

max float

The 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

min float

The inclusive lower bound.

max float

The exclusive upper bound.

Returns

float

A random float in [min, max).