H
Hicham Mouline
Hello,
I have code that resembles:
double Get(...) {
double var1;
double bound1.... boundN; // N is of the order of 7/8
double output;
if (var1< bound1)
output = ...;
else if (var1< bound2)
output = ...;
....
else if (var1< boundN)
output = ...;
else
output = ...;
return output;
}
is there a more efficient way of writing this?
rds,
I have code that resembles:
double Get(...) {
double var1;
double bound1.... boundN; // N is of the order of 7/8
double output;
if (var1< bound1)
output = ...;
else if (var1< bound2)
output = ...;
....
else if (var1< boundN)
output = ...;
else
output = ...;
return output;
}
is there a more efficient way of writing this?
rds,