diff --git a/include/aare/ClusterFinder.hpp b/include/aare/ClusterFinder.hpp index 091a45c..aa07141 100644 --- a/include/aare/ClusterFinder.hpp +++ b/include/aare/ClusterFinder.hpp @@ -163,7 +163,7 @@ class ClusterFinder { // If the cluster type is an integral type, then we need to round the value before storing it if constexpr(std::is_integral::value) { - auto tmp = std::round(frame(iy + ir, ix + ic) - m_pedestal.mean(iy + ir, ix + ic)); + auto tmp = std::lround(frame(iy + ir, ix + ic) - m_pedestal.mean(iy + ir, ix + ic)); cluster.data[i] = static_cast(tmp); } // On the other hand if it's a floating point type we can just static cast directly