Hi all,
I am stuck at a point where I really should not be stuck. I am writing a macro that reads in a look up table to find the indices that correspond to a certain range of values in the LUT.
Here is the code snippet:
filestring=File.openAsString(path);
lut=split(filestring, "\n");
s = 0; e = 0; start = 250; end = 3500;
for(i=0;i<px_x;i++){
if(lut[i]>=start && s==0){
s = i;
}
if(lut[i]>=end && e==0){
e = i;
}
}
(by the way, can I omit the {} in a one-line if-statement as I can in C?)
Now, interestingly, the second if-clause always triggers when lut[i] is larger than 350, not 3500 (aka way too early)
If i set end to 50000, it triggers at 500. If i set it to 3.5E3, at 350. Does anyone have an idea what causes this or what I am not getting?
Thanks a lot
Toby