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

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::trunc_int (const T x) noexcept
 
template<typename T >
constexpr T internal::trunc_check_internal (const T x) noexcept
 
template<>
constexpr float internal::trunc_check_internal< float > (const float x) noexcept
 
template<>
constexpr double internal::trunc_check_internal< double > (const double x) noexcept
 
template<>
constexpr long double internal::trunc_check_internal< long double > (const long double x) noexcept
 
template<typename T >
constexpr T internal::trunc_check (const T x) noexcept
 
template<typename T >
constexpr return_t< T > trunc (const T x) noexcept
 Compile-time trunc function. More...
 

Function Documentation

◆ trunc()

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

Compile-time trunc function.

Parameters
xa real-valued input.
Returns
computes the trunc-value of the input, essentially returning the integer part of the input.