aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-05-11 17:33:20 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:26 +0100
commit0910580f88ce9eeaab33f0b694a5fbac5884c642 (patch)
treebd123ac500761e28d88a64973e350a0594c260d4 /src/partial_sim.c
parentcd82a27f3c2f5eadc984c582e9a4a85768363759 (diff)
Move gaussian_noise() to utils.c and synergise it with poisson_noise()
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index 55e8521d..c0c44212 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -31,20 +31,6 @@
#include "stream.h"
-static double gaussian_noise(double expected, double variance)
-{
- double x1, x2, noise;
-
- /* A uniformly distributed random number between 0 and 1 */
- x1 = ((double)random()/RAND_MAX);
- x2 = ((double)random()/RAND_MAX);
-
- noise = sqrt(-2.0*log(x1)) * cos(2.0*M_PI*x2);
-
- return expected + noise*variance;
-}
-
-
static void mess_up_cell(UnitCell *cell)
{
double ax, ay, az;