WPILibC++ 2023.4.3
fmod.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::fmod_check (const T x, const T y) noexcept
 
template<typename T1 , typename T2 , typename TC = common_return_t<T1,T2>>
constexpr TC internal::fmod_type_check (const T1 x, const T2 y) noexcept
 
template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > fmod (const T1 x, const T2 y) noexcept
 Compile-time remainder of division function. More...
 

Function Documentation

◆ fmod()

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

Compile-time remainder of division function.

Parameters
xa real-valued input.
ya real-valued input.
Returns
computes the floating-point remainder of \( x / y \) (rounded towards zero) using

\[ \text{fmod}(x,y) = x - \text{trunc}(x/y) \times y \]