diff options
Diffstat (limited to 'src/diffraction.c')
-rw-r--r-- | src/diffraction.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/diffraction.c b/src/diffraction.c index 6383a8b4..8a50e115 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -146,25 +146,23 @@ static double sym_lookup_phase(const double *phases, signed int h, signed int k, signed int l) { int i; - double ret = 0.0; for ( i=0; i<num_equivs(sym, NULL); i++ ) { signed int he; signed int ke; signed int le; - double f, val; + double f; get_equiv(sym, NULL, i, h, k, l, &he, &ke, &le); f = (double)lookup_arr_flag(flags, he, ke, le); - val = lookup_arr_phase(phases, he, ke, le); - ret += f*val; + if ( f ) return lookup_arr_phase(phases, he, ke, le); } - return ret; + return 0.0; } |