Skip to content

Commit 2998918

Browse files
committed
CIre scaling problem fixed
1 parent 6148111 commit 2998918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/higher-level/index-hl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ float ind, scale = 10000.0;
169169
if (!ard[t].msk[p]){
170170
ts->tss_[t][p] = nodata;
171171
} else {
172-
ind = (ard[t].dat[b1][p]/ard[t].dat[b2][p])-1;
172+
ind = (ard[t].dat[b1][p] / (float)ard[t].dat[b2][p]) - 1.0;
173173
if (ard[t].dat[b2][p] == 0 || ind*scale > SHRT_MAX || ind*scale < SHRT_MIN){
174174
ts->tss_[t][p] = nodata;
175175
} else {

0 commit comments

Comments
 (0)