Commit 2280d09d authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

ENH:change condition test if coeff[0] is numerically zero

parent 3cca75c3
......@@ -141,7 +141,8 @@ WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
coeff = highPassCoeff;
while ((coeff[0] == coeff[coeff.size() - 1]) && (coeff[0] == 0.0))
const double epsilon = 0.0000000001;
while ((coeff[0] == coeff[coeff.size() - 1]) && (vcl_abs(coeff[0]) < epsilon))
{
ReduceFilterLength(coeff);
}
......@@ -168,7 +169,8 @@ WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
coeff = highPassCoeff;
while ((coeff[0] == coeff[coeff.size() - 1]) && (coeff[0] == 0.0))
const double epsilon = 0.0000000001;
while ((coeff[0] == coeff[coeff.size() - 1]) && (vcl_abs(coeff[0]) < epsilon))
{
assert(coeff.size() > 1);
ReduceFilterLength(coeff);
......
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