Skip to content
Snippets Groups Projects
Commit 92732853 authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Code formatting random.h

parent 57a0fa4e
Branches
Tags
1 merge request!705Star formation following Schaye08
......@@ -56,7 +56,9 @@ INLINE static double random_unit_interval(const long long int id,
static const double RAND_MAX_inv = 1. / ((double)RAND_MAX);
/* Calculate the seed */
unsigned int seed = ((937LL*id+1109LL)%2147987LL + (ti_current-1) % 1514917LL + (long long)type) % seed_range;
unsigned int seed = ((937LL * id + 1109LL) % 2147987LL +
(ti_current - 1) % 1514917LL + (long long)type) %
seed_range;
/* Generate a random number between 0 and 1. */
return rand_r(&seed) * RAND_MAX_inv;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment