From d5ba0245585354b7624552066db07b13c5df532f Mon Sep 17 00:00:00 2001 From: Willem Lambooy Date: Fri, 2 Jun 2023 17:40:11 +0200 Subject: [PATCH] :art: Added `noexcept` to `math_utils` functions --- include/fiction/utils/math_utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fiction/utils/math_utils.hpp b/include/fiction/utils/math_utils.hpp index 7a306ce75..bcd439795 100644 --- a/include/fiction/utils/math_utils.hpp +++ b/include/fiction/utils/math_utils.hpp @@ -22,7 +22,7 @@ namespace fiction * @return The number rounded to n decimal places. */ template -T round_to_n_decimal_places(const T number, const uint64_t n) +T round_to_n_decimal_places(const T number, const uint64_t n) noexcept { static_assert(std::is_arithmetic_v, "T is not a number type"); const T factor = std::pow(10, n); @@ -37,7 +37,7 @@ T round_to_n_decimal_places(const T number, const uint64_t n) * @return |n|. */ template -T integral_abs(const T n) +T integral_abs(const T n) noexcept { static_assert(std::is_integral_v, "T is not an integral number type");