Commit efb6c3c1 authored by Andreas Buykx's avatar Andreas Buykx Committed by Kitware Robot

Merge topic 'boundingbox-divisions'

8563476f Minor fixes to computation of divisions
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !5140
parents 2db2bb54 8563476f
......@@ -484,6 +484,7 @@ ComputeDivisions(vtkIdType totalBins, double bounds[6], int divs[3]) const
if ( lengths[i] > max )
{
maxIdx = i;
max = lengths[i];
}
if ( lengths[i] > zeroDetectionTolerance )
{
......@@ -539,9 +540,8 @@ ComputeDivisions(vtkIdType totalBins, double bounds[6], int divs[3]) const
bounds[2*i+1] = this->MaxPnt[i] + delta;
}
}
// Safe to return
return (divs[0] * divs[1] * divs[2]);
assert( static_cast<vtkIdType>(divs[0])*divs[1]*divs[2] < totalBins );
return static_cast<vtkIdType>(divs[0])*divs[1]*divs[2];
}
// ---------------------------------------------------------------------------
......
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