aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-11 17:05:33 +0200
committerThomas White <taw@physics.org>2019-09-12 16:35:52 +0200
commitaad71902c94b3bc21ab34b0e2c92972400921574 (patch)
tree68b160548df11af3e2748bf53cdd04fab70dde80 /libcrystfel
parent8695e135823b6b6708713761dd41a0871551522c (diff)
Fix sign of zl comparison
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/geometry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index 5b2107d1..fc42a8de 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -332,7 +332,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
/* Closest point on Ewald sphere.
* Project zl to 0, bit of a hack... */
- const double zlp0 = zl>0?zl:0;
+ const double zlp0 = zl<0?zl:0;
exerr2 = (x-xl)*(x-xl) + (y-yl)*(y-yl) + (z-zl)*(z-zl);
/* Weighted average between projected lattice point