aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-07 11:46:08 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:27 +0100
commit73d5930cb8351d470e583c6ab5ed22ff1a851c8f (patch)
tree9c68694ce5a47c35b9854035d4ee5d226615471d /data
parent7c9a1213cf57f65ad758e923be3372a0dfd34c0a (diff)
Tidy up
Diffstat (limited to 'data')
-rw-r--r--data/diffraction.cl8
1 files changed, 5 insertions, 3 deletions
diff --git a/data/diffraction.cl b/data/diffraction.cl
index e58f16a2..9f939413 100644
--- a/data/diffraction.cl
+++ b/data/diffraction.cl
@@ -57,11 +57,13 @@ float4 get_q(float fs, float ss, float res, float clen, float k,
kzn = k*(native_cos(tt)-1.0);
/* x divergence */
- kx = kxn*cos(xdiv) +kzn*sin(xdiv);
- kz = -kxn*sin(xdiv) +kzn*cos(xdiv);
- kxn = kx; kzn = kz;
+ kx = kxn*native_cos(xdiv) +kzn*native_sin(xdiv);
+ ky = kyn;
+ kz = -kxn*native_sin(xdiv) +kzn*native_cos(xdiv);
+ kxn = kx; kyn = ky; kzn = kz;
/* y divergence */
+ kx = kxn;
ky = kyn*cos(ydiv) +kzn*sin(ydiv);
kz = -kyn*sin(ydiv) +kzn*cos(ydiv);