VPSourceToolbox GetDoubleNormallyDistributedRandomNumbers Method Virtual Photonics - VTS Library
Virtual Photonics
Generate two normally (Gaussian) distributed random numbers by using Box Muller Algorithm (with sine/cosine)

Namespace: Vts.MonteCarlo.Helpers
Assembly: Vts (in Vts.dll) Version: 1.0.12.0 (1.0.12)
Syntax

public static void GetDoubleNormallyDistributedRandomNumbers(
	ref double nrng1,
	ref double nrng2,
	double lowerLimit,
	double upperLimit,
	Random rng
)

Parameters

nrng1
Type: OnlineSystem Double 
normally distributed random number 1
nrng2
Type: OnlineSystem Double 
normally distributed random number 2
lowerLimit
Type: OnlineSystem Double
lower limit of the uniform random number
upperLimit
Type: OnlineSystem Double
lower limit of the uniform random number
rng
Type: OnlineSystem Random
The random number generator
See Also