WPILibC++ 2023.4.3-108-ge5452e3
hypot.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::hypot_compute (const T x, const T ydx) noexcept
 
template<typename T >
constexpr T internal::hypot_vals_check (const T x, const T y) noexcept
 
template<typename T1 , typename T2 , typename TC = common_return_t<T1,T2>>
constexpr TC internal::hypot_type_check (const T1 x, const T2 y) noexcept
 
template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > hypot (const T1 x, const T2 y) noexcept
 Compile-time Pythagorean addition function. More...
 

Function Documentation

◆ hypot()

template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > hypot ( const T1  x,
const T2  y 
)
constexprnoexcept

Compile-time Pythagorean addition function.

Parameters
xa real-valued input.
ya real-valued input.
Returns
Computes \( x \oplus y = \sqrt{x^2 + y^2} \).