Commit 9b9323b0 authored by Sina Ackermann's avatar Sina Ackermann

[groundwater] Fix bug in isInLens

'isInLens' was always false
parent 5aca9f7f
......@@ -109,9 +109,11 @@ private:
bool isInLens_(const Lens& lens, const GlobalPosition& globalPos) const
{
for (unsigned int dimIdx = 0; dimIdx < dimWorld; ++dimIdx)
if (globalPos[dimIdx] > lens.lowerLeft[dimIdx] - eps_ && globalPos[dimIdx] < lens.upperRight[dimIdx] + eps_)
return true;
return false;
{
if (globalPos[dimIdx] < lens.lowerLeft[dimIdx] + eps_ || globalPos[dimIdx] > lens.upperRight[dimIdx] - eps_)
return false;
}
return true;
}
const Scalar eps_ = 1e-6;
......
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