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

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::sin_compute (const T x) noexcept
 
template<typename T >
constexpr T internal::sin_check (const T x) noexcept
 
template<typename T >
constexpr return_t< T > sin (const T x) noexcept
 Compile-time sine function. More...
 

Function Documentation

◆ sin()

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

Compile-time sine function.

Parameters
xa real-valued input.
Returns
the sine function using

\[ \sin(x) = \frac{2\tan(x/2)}{1+\tan^2(x/2)} \]