Class Rng
Conveniently wrapped ThreadLocal<Random> class.
Inheritance
object
System.Random
Rng
Inherited Members
System.Random.Sample()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Syntax
public class Rng : Random
Constructors
Rng()
Declaration
Rng(Guid)
Declaration
Parameters
Type |
Name |
Description |
System.Guid |
seed |
|
Rng(int)
Declaration
Parameters
Type |
Name |
Description |
int |
seed |
|
Properties
InnerRng
Declaration
public Rng InnerRng { get; }
Property Value
Methods
Next()
Declaration
public override int Next()
Returns
Overrides
System.Random.Next()
Next(int, int)
Declaration
public override int Next(int minValue, int maxValue)
Parameters
Type |
Name |
Description |
int |
minValue |
|
int |
maxValue |
|
Returns
Overrides
System.Random.Next(int, int)
Next(int)
Declaration
public override int Next(int maxValue)
Parameters
Type |
Name |
Description |
int |
maxValue |
|
Returns
Overrides
System.Random.Next(int)
NextBool()
Declaration
Returns
NextBytes(byte[])
Declaration
public override void NextBytes(byte[] buffer)
Parameters
Type |
Name |
Description |
byte[] |
buffer |
|
Overrides
System.Random.NextBytes(byte[])
NextDouble()
Declaration
public override double NextDouble()
Returns
Overrides
System.Random.NextDouble()
NextDouble(double, double)
Declaration
public double NextDouble(double minValue, double maxValue)
Parameters
Type |
Name |
Description |
double |
minValue |
|
double |
maxValue |
|
Returns
NextDouble(double)
Declaration
public double NextDouble(double maxValue)
Parameters
Type |
Name |
Description |
double |
maxValue |
|
Returns
NextFloat()
Declaration
Returns
NextFloat(float, float)
Declaration
public float NextFloat(float minValue, float maxValue)
Parameters
Type |
Name |
Description |
float |
minValue |
|
float |
maxValue |
|
Returns
NextFloat(float)
Declaration
public float NextFloat(float maxValue)
Parameters
Type |
Name |
Description |
float |
maxValue |
|
Returns
Extension Methods