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
Next(int)
Gets the next the random integer value below the given maximum.
int Next(int maxValue)
Parameters
maxValue
int
Returns
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
Returns
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
RandomOnSphere(float)
Returns a random value on the surface of a sphere with a given radius.
Vector3 RandomOnSphere(float radius)
Parameters
radius
floatThe radius.
Returns
- Vector3
Vector3.