2using System.Collections;
3using System.Collections.Generic;
38 throw new ArgumentOutOfRangeException(
"sigma",
"Must be greater than zero.");
40 u1 = base.NextDouble();
41 u2 = base.NextDouble();
42 temp1 = Math.Sqrt( -2 * Math.Log(
u1 ) );
45 return mu + sigma * (
temp1 * Math.Cos(
temp2 ) );
Takes two uniformly distributed deviates within the unit circle, and transforms them into two indepen...
double RandomGauss(double mu=0, double sigma=1)
Obtains normally (Gaussian) distrubuted random numbers, using the Box-Muller transformation....
GaussianDistribution(int seed)