3#ifndef TETL_NUMERIC_ABS_HPP
4#define TETL_NUMERIC_ABS_HPP
6#include <etl/_limits/numeric_limits.hpp>
12template <
typename Type>
13[[nodiscard]]
constexpr auto abs(Type input)
noexcept -> Type
16 if constexpr (limits::is_signed
or not limits::is_specialized) {
18 return static_cast<Type>(-input);
constexpr auto abs(Type input) noexcept -> Type
Returns the absolute value.
Definition abs.hpp:13
Definition adjacent_find.hpp:9
Definition numeric_limits.hpp:18