Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Namespaces | Functions
float_math.hpp File Reference
#include <cmath>
#include <type_traits>
#include <algorithm>
Include dependency graph for float_math.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 jau
 

Functions

template<class T >
bool jau::in_range (const T &a, const T &b, const T &delta)
 Returns true, if both integer point values differ less than the given delta. More...
 
template<class T >
std::enable_if<!std::numeric_limits< T >::is_integer, T >::type jau::machineEpsilon ()
 Calculates the smallest floating point value approximation the given type T can represent, the machine epsilon of T. More...
 
template<class T >
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type jau::machine_equal (const T &a, const T &b, int ulp=1, const T &epsilon=std::numeric_limits< T >::epsilon())
 Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * ulp. More...
 
template<class T >
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type jau::almost_equal (const T &a, const T &b, int ulp=1, const T &epsilon=std::numeric_limits< T >::epsilon())
 Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * |a+b| * ulp, where |a+b| scales epsilon to the magnitude of used values. More...