diff --git a/src/simplnx/Utilities/HistogramUtilities.hpp b/src/simplnx/Utilities/HistogramUtilities.hpp index e30b6168c7..0316045d8f 100644 --- a/src/simplnx/Utilities/HistogramUtilities.hpp +++ b/src/simplnx/Utilities/HistogramUtilities.hpp @@ -69,9 +69,16 @@ void FillBinRanges(Container& outputContainer, const std::pair& rang } template -Type CalculateBin(Type value, Type min, float32 increment) +auto CalculateBin(Type value, Type min, float32 increment) { - return static_cast(std::floor(static_cast(value - min) / increment)); + if constexpr(std::is_same_v) + { + return static_cast(std::floor(static_cast(static_cast(value) - static_cast(min)) / increment)); + } + else + { + return static_cast(std::floor(static_cast(value - min) / increment)); + } } /**