WPILibC++ 2023.4.3
acos.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::acos_compute (const T x) noexcept
 
template<typename T >
constexpr T internal::acos_check (const T x) noexcept
 
template<typename T >
constexpr return_t< T > acos (const T x) noexcept
 Compile-time arccosine function. More...
 

Function Documentation

◆ acos()

template<typename T >
constexpr return_t< T > acos ( const T  x)
constexprnoexcept

Compile-time arccosine function.

Parameters
xa real-valued input, where \( x \in [-1,1] \).
Returns
the inverse cosine function using

\[ \text{acos}(x) = \text{atan} \left( \frac{\sqrt{1-x^2}}{x} \right) \]