LibreOffice Module o3tl (master) 1
Namespaces | Functions
float_int_conversion.hxx File Reference
#include <sal/config.h>
#include <cmath>
#include <limits>
#include <type_traits>
Include dependency graph for float_int_conversion.hxx:

Go to the source code of this file.

Namespaces

namespace  o3tl
 

Functions

template<typename F , typename I >
constexpr std::enable_if_t< std::is_floating_point_v< F > &&std::is_integral_v< I >, bool > o3tl::convertsToAtLeast (F value, I min)
 
template<typename F , typename I >
constexpr std::enable_if_t< std::is_floating_point_v< F > &&std::is_integral_v< I >, bool > o3tl::convertsToAtMost (F value, I max)
 
template<typename I , typename F >
constexpr std::enable_if_t< std::is_floating_point_v< F > &&std::is_integral_v< I >, I > o3tl::saturating_cast (F f)
 
template<typename F >
std::enable_if_t< std::is_floating_point_v< F >, F > o3tl::roundAway (F value)