S&box Wiki

Sandbox.Rand

Provide unseeded random values

Methods

static Color Color()
Returns a random Color
static double Double( double max = 1 )
Returns a random double between 0 and max (or 1)
static float Float( float max = 1 )
Returns a random float between 0 and max (or 1)
static T FromArray( T[] array, T defVal )
static T FromList( List<T> array, T defVal )
static int Int( int max )
Returns a random int between 0 and max (inclusive)
static void SetSeed( int seed )
Sets the seed for these static classes