diff --git a/Consensus.cpp b/Consensus.cpp index 994adec..cc2aa6a 100644 --- a/Consensus.cpp +++ b/Consensus.cpp @@ -105,8 +105,8 @@ void Consensus::findConsensus(const vector & points, const vector { FILE_LOG(logDEBUG) << "Consensus::findConsensus() call"; - //If no points are available, reteurn nan - if (points.size() == 0) + //If at least two points are not available, return nan + if (points.size() < 2) { center.x = numeric_limits::quiet_NaN(); center.y = numeric_limits::quiet_NaN();