static Vector3 Gaussian3D( System.Random self, System.Nullable<Vector3> mean, System.Nullable<Vector3> stdDev )

robot_2Generated
code_blocksInput

Description

The Gaussian3D method is an extension method for the System.Random class, allowing you to generate a random Vector3 value based on a Gaussian (normal) distribution. This method is useful for simulations or procedural generation where a normal distribution is desired.

Usage

To use the Gaussian3D method, you need to have an instance of System.Random. You can specify the mean and standard deviation for each component of the Vector3. If not specified, the default mean is Vector3.Zero and the default standard deviation is Vector3.One.

Example usage:

System.Random random = new System.Random();
Vector3 randomVector = random.Gaussian3D(mean: new Vector3(0, 0, 0), stdDev: new Vector3(1, 1, 1));

Example

System.Random random = new System.Random();
Vector3 mean = new Vector3(0, 0, 0);
Vector3 stdDev = new Vector3(1, 1, 1);
Vector3 randomVector = random.Gaussian3D(mean, stdDev);
// randomVector now contains a Vector3 with each component generated from a Gaussian distribution with the specified mean and standard deviation.