37 #include <visp3/core/vpGaussRand.h>
47 double vpGaussRand::gaussianDraw()
50 m_AlreadyDone =
false;
55 double v1 = 0, v2 = 0, rsq = 0;
57 v1 = 2 * m_rng.
uniform(0.0, 1.0) - 1;
58 v2 = 2 * m_rng.
uniform(0.0, 1.0) - 1;
59 rsq = v1 * v1 + v2 * v2;
62 double fac = sqrt(-2 * log(rsq) / rsq);
int uniform(int a, int b)