Table of Contents

Interface IRandom

Namespace
Gamelogic.Extensions
Assembly
Assembly-CSharp.dll

Represents a random generator.

[Version(1, 5, 0)]
public interface IRandom
Extension Methods

Methods

Next()

Gets the next the random integer value.

int Next()

Returns

int

Next(int)

Gets the next the random integer value below the given maximum.

int Next(int maxValue)

Parameters

maxValue int

Returns

int

Next(int, int)

Gets the next the random integer value greater than or equal to the minimum and below the given maximum.

int Next(int minValue, int maxValue)

Parameters

minValue int
maxValue int

Returns

int

NextBytes(byte[])

Fills the given array with random bytes.

void NextBytes(byte[] bytes)

Parameters

bytes byte[]

NextDouble()

Gets the next the random double value.

double NextDouble()

Returns

double

RandomOnSphere(float)

Returns a random value on the surface of a sphere with a given radius.

Vector3 RandomOnSphere(float radius)

Parameters

radius float

The radius.

Returns

Vector3

Vector3.