diff options
author | Thomas White <taw@physics.org> | 2011-03-04 19:46:27 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:17 +0100 |
commit | ac61b031a819b3039b6ed3bf1dd87c6b4b56e0d5 (patch) | |
tree | 59ab2f2ff62d84704132c6644f68f93425c42319 /src/diffraction.c | |
parent | 19ef22337eb31c423c471de1fd90cee13964fde7 (diff) |
Fix aliasing issues in CPU simulation
Diffstat (limited to 'src/diffraction.c')
-rw-r--r-- | src/diffraction.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/diffraction.c b/src/diffraction.c index 6b9daf7f..76dce6b6 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -388,11 +388,13 @@ void get_diffraction(struct image *image, int na, int nb, int nc, double I_molecule; struct rvec q; double twotheta; - const double dfs = fs + (fs_step / SAMPLING); - const double dss = ss + (ss_step / SAMPLING); + const double dfs = (double)fs + + ((double)fs_step / SAMPLING); + const double dss = (double)ss + + ((double)ss_step / SAMPLING); /* Calculate k this time round */ - k = klow + kstep * bwstep; + k = klow + (double)kstep * bwstep; q = get_q(image, dfs, dss, &twotheta, k); |