Skip to content

Commit

Permalink
Update projector2d.cpp
Browse files Browse the repository at this point in the history
min and max ranges need <= and >= comparisons.
  • Loading branch information
Giorgio Grisetti committed Jul 27, 2015
1 parent 0dbbf39 commit 0c28dfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tsm_core/projector2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace tsm {

float range = sqrt(real_pt.x() * real_pt.x() + real_pt.z() * real_pt.z());

if (real_pt.z() != real_pt.z() || real_pt.z() < _min_range || real_pt.z() > _max_range)
if (real_pt.z() != real_pt.z() || real_pt.z() <= _min_range || real_pt.z() >= _max_range)
continue;

ranges[c] = range;
Expand Down Expand Up @@ -137,7 +137,7 @@ namespace tsm {
for (size_t i = 0; i < ranges.size(); ++i){
float r = ranges[i];

if (r != r || r < _min_range || r > _max_range)
if (r != r || r <= _min_range || r >= _max_range)
continue;

model[k]._point = _sct->sincos(i) * r;
Expand Down

0 comments on commit 0c28dfa

Please sign in to comment.