From dc962f221c23a9f8781bb3243cf69180f9f88aa8 Mon Sep 17 00:00:00 2001 From: tizianoGuadagnino Date: Thu, 7 Nov 2024 15:35:39 +0100 Subject: [PATCH] Clean comments --- ros/src/kinematic_icp_ros/utils/RosUtils.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ros/src/kinematic_icp_ros/utils/RosUtils.cpp b/ros/src/kinematic_icp_ros/utils/RosUtils.cpp index a8f05fa..3f840e6 100644 --- a/ros/src/kinematic_icp_ros/utils/RosUtils.cpp +++ b/ros/src/kinematic_icp_ros/utils/RosUtils.cpp @@ -68,9 +68,10 @@ auto ExtractTimestampsFromMsg(const PointCloud2::ConstSharedPtr msg, timestamps.reserve(n_points); for (size_t i = 0; i < n_points; ++i, ++it) { double stampd = static_cast(*it); - // If the number of digits is greater than 10, - // the stamp is in nanoseconds instead of seconds, perform conversion - if (number_of_digits_decimal_part(*it) > 10) { + // If the number of digits is greater than 10 (which is the maximum number of digits + // that can be represented with a 32 bits integer), the stamp is in nanoseconds instead + // of seconds, perform conversion + if (number_of_digits_decimal_part(stampd) > 10) { stampd *= 1e-9; } timestamps.emplace_back(stampd);