aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reax.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-02-04 11:44:55 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:45 +0100
commit9d4192409e8fd94d49b237cfbf007a5e85cf7495 (patch)
treebd101c8d8b214fe5e5e71ff5088739797fe4285e /libcrystfel/src/reax.c
parentfa25676e861138218327c74f331b661f3c0186cd (diff)
Take absolute value of distance from reciprocal lattice point
Diffstat (limited to 'libcrystfel/src/reax.c')
-rw-r--r--libcrystfel/src/reax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c
index 90d4e59d..a8a1152e 100644
--- a/libcrystfel/src/reax.c
+++ b/libcrystfel/src/reax.c
@@ -291,7 +291,7 @@ static double iterate_refine_vector(double *x, double *y, double *z,
kno = f->rx*(*x) + f->ry*(*y) + f->rz*(*z); /* Sorry ... */
kn = nearbyint(kno);
- if ( kn - kno > 0.3 ) continue;
+ if ( fabs(kn - kno) > 0.3 ) continue;
xv[0] = f->rx; xv[1] = f->ry; xv[2] = f->rz;