summaryrefslogtreecommitdiff
path: root/src/randfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/randfuncs.c')
-rw-r--r--src/randfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/randfuncs.c b/src/randfuncs.c
index 830e078..137c7ff 100644
--- a/src/randfuncs.c
+++ b/src/randfuncs.c
@@ -57,10 +57,10 @@ double *genfunc_hyperuniform(unsigned int L, bound_t boundary, gsl_rng *r, unsig
ds[2] = pow(x-lattice[2*j] - 1,2)+pow(y-lattice[2*j+1],2);
ds[3] = pow(x-lattice[2*j],2)+pow(y-lattice[2*j+1] + 1,2);
ds[4] = pow(x-lattice[2*j],2)+pow(y-lattice[2*j+1] - 1,2);
- unsigned int min_pos = 0; double min_val = 100;
+ double min_val = 100;
for (unsigned int k = 0; k < 5; k++) {
if (min_val > ds[k]) {
- min_pos = k; min_val = ds[k];
+ min_val = ds[k];
}
}
if (1-gsl_sf_exp(-M_PI * rho * min_val) < gsl_ran_flat(r, 0, 1)) {