Skip to content
Snippets Groups Projects
Commit 9ff0c83f authored by Harry Jeffery's avatar Harry Jeffery
Browse files

Refs #11355 Fix stepsize calculation for additional dimensions

parent 58c70885
No related branches found
No related tags found
No related merge requests found
......@@ -354,11 +354,9 @@ void CutMD::exec() {
steppedExtents.push_back(std::make_pair(pbins[i][0], pbins[i][1]));
steppedBins.push_back(1);
} else if (nArgs == 3) {
const double dimRange = pbins[i][2] - pbins[i][0];
const double stepSize = pbins[i][1] < dimRange ? pbins[i][1] : dimRange;
steppedExtents.push_back(std::make_pair(pbins[i][0], pbins[i][2]));
double stepSize = pbins[i][1];
double dimRange = extentLimit.second - extentLimit.first;
if (stepSize > dimRange)
stepSize = dimRange;
steppedBins.push_back(static_cast<int>(dimRange / stepSize));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment