aboutsummaryrefslogtreecommitdiff
path: root/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-11-19 16:42:29 +0100
committerThomas White <taw@physics.org>2009-11-19 16:42:29 +0100
commit377810c338e2f84d0ebc4b44086eb8ecf5f6741d (patch)
tree23881e8c3ada29a19f6e480d64e3d8c4886fc2c1 /src/detector.c
parentbee783eed9fcbcfa6b0d5be0bb98709757261b7a (diff)
Add explicit casts when converting types
Diffstat (limited to 'src/detector.c')
-rw-r--r--src/detector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/detector.c b/src/detector.c
index 6ca5e8e7..8467a322 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -125,7 +125,7 @@ static uint16_t *bloom(double *hdr_in, int width, int height)
/* Turn into integer array of counts */
for ( x=0; x<width; x++ ) {
for ( y=0; y<height; y++ ) {
- data[x + width*y] = tmp[x + width*y];
+ data[x + width*y] = (uint16_t)tmp[x + width*y];
}
}
@@ -163,7 +163,7 @@ void record_image(struct image *image)
double complex val;
val = image->sfacs[x + image->width*y];
- intensity = val * conj(val);
+ intensity = (double)(val * conj(val));
/* What solid angle is subtended by this pixel? */
sa = sa_per_pixel * cos(image->twotheta[x + image->width*y]);