Commit 814f4e87 authored by Purves, Murray's avatar Purves, Murray
Browse files

Fixing incorrect replacement of values for resample interpolation min/max with...

Fixing incorrect replacement of values for resample interpolation min/max with high-to-low base values
parent 4b272183
Pipeline #28265 failed with stages
in 2 minutes and 43 seconds
......@@ -187,7 +187,8 @@ std::vector<T> interpolateToOtherBaseValues(
radix_line(" Base value "
<< newBaseValues[i] << " below range " << baseValues.front()
<< "-" << baseValues.back() << ": filling with lowest");
finalInterpolatedValues[i] = initialInterpolatedValues.front();
finalInterpolatedValues[i] = std::min(initialInterpolatedValues.front(),
initialInterpolatedValues.back());
}
// Fill in values with a new base higher than the highest original
else if ((lowToHigh && newBaseValues[i] > baseValues.back()) ||
......@@ -196,7 +197,8 @@ std::vector<T> interpolateToOtherBaseValues(
radix_line(" Base value "
<< newBaseValues[i] << " above range " << baseValues.front()
<< "-" << baseValues.back() << ": filling with highest");
finalInterpolatedValues[i] = initialInterpolatedValues.back();
finalInterpolatedValues[i] = std::max(initialInterpolatedValues.front(),
initialInterpolatedValues.back());
}
// Fill in central values
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment