48 bool close_to_zero(T value, T eps = std::numeric_limits<T>::epsilon()) {
49 if constexpr (std::is_integral_v<T>) {
52 }
else if constexpr (std::is_floating_point_v<T>) {
53 return std::abs(value) < eps;
55 static_assert(std::is_arithmetic_v<T>,
"close_to_zero: Only arithmetic types supported");