From 0b6e6a4337e8e9b6728f3604bb61a59365be3446 Mon Sep 17 00:00:00 2001 From: pants Date: Thu, 8 Sep 2016 12:28:07 -0400 Subject: src/bound_set.c --- src/randfuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/randfuncs.c') 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)) { -- cgit v1.2.3-70-g09d2