Class GaussianRandom
Generates random values based on a Gaussian or normal distribution. Points are distributed around a central point with decreasing probability as distance increases.
Inheritance
Implements
Namespace: GUPS.EasyPooling.Policy.Random
Assembly: cs.temp.dll.dll
Syntax
public class GaussianRandom : IRandom
Constructors
GaussianRandom(Int32)
Initializes a new instance of the GaussianRandom class with the specified standard deviation and seed.
Declaration
public GaussianRandom(int _Seed)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | _Seed | The seed value for the random number generator. |
Methods
GetRandom()
Generates a random floating-point number based on a Gaussian distribution, with a mean of 0 and a standard deviation of 1.
Declaration
public float GetRandom()
Returns
Type | Description |
---|---|
System.Single | Generates a random floating-point number between -1 (inclusive) and 1 (exclusive). |
GetRandom(Single, Single)
Generates a random floating-point number based on a Gaussian distribution, between the specified values.
Declaration
public float GetRandom(float _MinInclusive, float _MaxExclusive)
Parameters
Type | Name | Description |
---|---|---|
System.Single | _MinInclusive | The minimum value (inclusive). |
System.Single | _MaxExclusive | The maximum value (exclusive). |
Returns
Type | Description |
---|---|
System.Single | Generates a random floating-point number between the passed min (inclusive) and max (exclusive) value. |
GetRandomVector2()
Generates a random 2D vector with numbers based on a Gaussian distribution.
Declaration
public Vector2 GetRandomVector2()
Returns
Type | Description |
---|---|
Vector2 | A random 2D vector with numbers between -1 (inclusive) and 1 (exclusive). |
GetRandomVector3()
Generates a random 3D vector with numbers based on a Gaussian distribution.
Declaration
public Vector3 GetRandomVector3()
Returns
Type | Description |
---|---|
Vector3 | A random 3D vector with numbers between -1 (inclusive) and 1 (exclusive). |