From abb925c73b0ddfd3e5cc39ed1c484d4318b48b22 Mon Sep 17 00:00:00 2001 From: marco <marco@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Wed, 18 Aug 2010 09:59:11 +0000 Subject: [PATCH] fix bug in within statement found by inspection git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2650 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/mol/base/src/query_state.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mol/base/src/query_state.cc b/modules/mol/base/src/query_state.cc index c3e68560b..c84670d78 100644 --- a/modules/mol/base/src/query_state.cc +++ b/modules/mol/base/src/query_state.cc @@ -63,7 +63,7 @@ bool QueryState::do_within(const geom::Vec3& pos, const impl::WithinParam& p, if (op==COP_LE) return geom::Dot(d, d) <= p.GetRadiusSquare(); else - return geom::Dot(d, d) >= p.GetRadiusSquare(); + return geom::Dot(d, d) > p.GetRadiusSquare(); } else { const LazilyBoundRef& r=this->GetBoundObject(p.GetRef()); for (AtomViewIter i=r.view.AtomsBegin(), e=r.view.AtomsEnd(); i!=e; ++i) { @@ -72,7 +72,7 @@ bool QueryState::do_within(const geom::Vec3& pos, const impl::WithinParam& p, if (geom::Dot(d, d) <= p.GetRadiusSquare()) { return true; } - } else if (geom::Dot(d, d) <= p.GetRadiusSquare()) { + } else if (geom::Dot(d, d) > p.GetRadiusSquare()) { return false; } } -- GitLab