5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MATH_ABS_DIFF_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_MATH_ABS_DIFF_HPP_
13#include "arene/base/stdlib_choice/enable_if.hpp"
14#include "arene/base/stdlib_choice/is_arithmetic.hpp"
25template <typename Number, constraints<std::enable_if_t<std::is_arithmetic<Number>::value>> =
nullptr>
26constexpr auto abs_diff(Number first, Number second)
noexcept -> Number {
28 return static_cast<Number
>(second - first);
30 return static_cast<Number
>(first - second);
Definition accumulate.hpp:37
constexpr auto abs_diff(Number first, Number second) noexcept -> Number
Calculate the absolute difference between two numbers.
Definition abs_diff.hpp:26
Definition accumulate.hpp:36