summaryrefslogtreecommitdiff
path: root/lib/rand.c
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2017-06-07 16:15:03 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2017-06-07 16:15:03 -0400
commitfa590b7542c11b417ee87eebdd162b7aa08b57d4 (patch)
treed4b884171ccd1072a78cfe0229b196523760b2c8 /lib/rand.c
parent23682e445ba64452c453346f516f9101761438ba (diff)
downloadfuse_networks-fa590b7542c11b417ee87eebdd162b7aa08b57d4.tar.gz
fuse_networks-fa590b7542c11b417ee87eebdd162b7aa08b57d4.tar.bz2
fuse_networks-fa590b7542c11b417ee87eebdd162b7aa08b57d4.zip
ran clang-format on all files
Diffstat (limited to 'lib/rand.c')
-rw-r--r--lib/rand.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/rand.c b/lib/rand.c
index 16aeba4..8ba2b2b 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -2,14 +2,14 @@
#include "fracture.h"
long double rand_dist_pow(const gsl_rng *r, double beta) {
- long double x = 0;
+ long double x = 0;
- // underflow means that for very small beta x is sometimes identically zero,
- // which causes problems
- while (x == 0.0) {
- long double y = logl(gsl_rng_uniform_pos(r)) / beta;
- x = expl(y);
- }
+ // underflow means that for very small beta x is sometimes identically zero,
+ // which causes problems
+ while (x == 0.0) {
+ long double y = logl(gsl_rng_uniform_pos(r)) / beta;
+ x = expl(y);
+ }
- return x;
+ return x;
}