WPILibC++ 2023.4.3
abs.hpp File Reference

Go to the source code of this file.

Functions

template<typename T >
constexpr T abs (const T x) noexcept
 Compile-time absolute value function. More...
 

Function Documentation

◆ abs()

template<typename T >
constexpr T abs ( const T  x)
constexprnoexcept

Compile-time absolute value function.

Parameters
xa real-valued input.
Returns
the absolute value of x, \( |x| \).