aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-04 15:25:59 +0100
committerThomas White <taw@physics.org>2014-03-04 15:25:59 +0100
commit3bcd0cb4cb5b328d54b4e8342215f47168216ace (patch)
treeb4c38b34db325e1f57fac03ce0eecca07fb2c911
parentfb1832f80cebe48f8bf066f37973058b7ce3e334 (diff)
Fussiness
-rw-r--r--src/ambigator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index 1e417ce2..d86dc63c 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -146,7 +146,6 @@ static float corr(Crystal *a, Crystal *b, int *pn)
s_x2 += aint*aint;
s_y2 += bint*bint;
n++;
-
}
*pn = n;
@@ -156,7 +155,7 @@ static float corr(Crystal *a, Crystal *b, int *pn)
if ( (t1 < 0.0) || (t2 <= 0.0) ) return 0.0;
- return (s_xy - s_x*s_y)/n/sqrt(t1*t2);
+ return ((s_xy - s_x*s_y)/n)/sqrt(t1*t2);
}
@@ -181,8 +180,8 @@ static void detwin(Crystal **crystals, int n_crystals, SymOpList *amb,
cc = corr(crystals[i], crystals[j], &n);
- if ( i == j ) continue;
if ( n < 3 ) continue;
+ if ( i == j ) continue;
if ( assignments[i] == assignments[j] ) {
f += cc;