Skip to content

Commit

Permalink
Merge pull request ros-drivers#136 from stsundermann/patch-1
Browse files Browse the repository at this point in the history
Use std::abs instead of abs
  • Loading branch information
Joshua Whitley committed Jan 26, 2018
2 parents b311237 + d66c729 commit 38e313e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions velodyne_pointcloud/src/lib/rawdata.cc
Expand Up @@ -283,7 +283,7 @@ namespace velodyne_rawdata
* (1 - corrections.focal_distance / 13100)
* (1 - corrections.focal_distance / 13100);
float focal_slope = corrections.focal_slope;
intensity += focal_slope * (abs(focal_offset - 256 *
intensity += focal_slope * (std::abs(focal_offset - 256 *
(1 - static_cast<float>(tmp.uint)/65535)*(1 - static_cast<float>(tmp.uint)/65535)));
intensity = (intensity < min_intensity) ? min_intensity : intensity;
intensity = (intensity > max_intensity) ? max_intensity : intensity;
Expand Down Expand Up @@ -462,7 +462,7 @@ namespace velodyne_rawdata
* (1 - corrections.focal_distance / 13100)
* (1 - corrections.focal_distance / 13100);
float focal_slope = corrections.focal_slope;
intensity += focal_slope * (abs(focal_offset - 256 *
intensity += focal_slope * (std::abs(focal_offset - 256 *
(1 - tmp.uint/65535)*(1 - tmp.uint/65535)));
intensity = (intensity < min_intensity) ? min_intensity : intensity;
intensity = (intensity > max_intensity) ? max_intensity : intensity;
Expand Down

0 comments on commit 38e313e

Please sign in to comment.