diff options
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/random.c b/random.c deleted file mode 100644 index f6cf85e..0000000 --- a/random.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "random.h" -#include <math.h> - -double randn(void) -{ - /* Generates a random number from a normal distribution using the - * Box-Muller transform. */ - double u1, u2; - - u1 = genrand_real1(); - u2 = genrand_real1(); - - return sqrt(-2*log(u1))*cos(2*M_PI*u2); -} |