diff options
author | Thomas White <taw@physics.org> | 2011-03-04 18:14:54 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:17 +0100 |
commit | 9357d8f186760fda060fe3324d88480c877c21f3 (patch) | |
tree | ddab7c657522ffa0372f79763099c160568b5c33 /src/detector.c | |
parent | ea2c477e283e8d945064956199151774a4764ad6 (diff) |
Transformation matrix shouldn't be integer
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/detector.c b/src/detector.c index e53d5331..b9d91118 100644 --- a/src/detector.c +++ b/src/detector.c @@ -32,7 +32,7 @@ static int atob(const char *a) } -static int dir_conv(const char *a, signed int *sx, signed int *sy) +static int dir_conv(const char *a, double *sx, double *sy) { if ( strcmp(a, "-x") == 0 ) { *sx = -1; *sy = 0; @@ -79,8 +79,8 @@ struct rvec get_q(struct image *image, double fs, double ss, /* Convert xs and ys, which are in fast scan/slow scan coordinates, * to x and y */ - xs = (fs-p->min_fs)*p->fsx + (ss-p->min_ss)*p->ssx; - ys = (fs-p->min_fs)*p->fsy + (ss-p->min_ss)*p->ssy; + xs = (fs-(double)p->min_fs)*p->fsx + (ss-(double)p->min_ss)*p->ssx; + ys = (fs-(double)p->min_fs)*p->fsy + (ss-(double)p->min_ss)*p->ssy; rx = (xs + p->cnx) / p->res; ry = (ys + p->cny) / p->res; |