Go to the source code of this file.
Functions |
template<typename TReturn , typename TInput > |
TReturn | itk::Math::CastWithRangeCheck (TInput x) |
template<TReturn , typename TInput > |
| itk::Math::Ceil (TInput x) |
template<typename T > |
bool | itk::Math::FloatAlmostEqual (T x1, T x2, typename Detail::FloatIEEE< T >::IntType maxUlps=4, typename Detail::FloatIEEE< T >::FloatType maxAbsoluteDifference=0.1 *NumericTraits< T >::epsilon()) |
template<typename T > |
Detail::FloatIEEE< T >::IntType | itk::Math::FloatDifferenceULP (T x1, T x2) |
template<TReturn , typename TInput > |
| itk::Math::Floor (TInput x) |
template<typename TReturn , typename TInput > |
TReturn | itk::Math::Round (TInput x) |
template<TReturn , typename TInput > |
| itk::Math::RoundHalfIntegerToEven (TInput x) |
template<TReturn , typename TInput > |
| itk::Math::RoundHalfIntegerUp (TInput x) |
Macro Definition Documentation
#define itkTemplateFloatingToIntegerMacro |
( |
|
name | ) |
|
Value:template< typename TReturn, typename TInput > \
inline TReturn name(TInput x) \
{ \
\
if ( sizeof( TReturn ) <= 4 ) \
{ \
return static_cast< TReturn >( Detail::name##_32(x) ); \
} \
else if ( sizeof( TReturn ) <= 8 ) \
{ \
return static_cast< TReturn >( Detail::name##_64(x) ); \
} \
else \
{ \
return static_cast< TReturn >( Detail::name##_base< TReturn, TInput >(x) ); \
} \
}
A useful macro to generate a template floating point to integer conversion templated on the return type and using either the 32 bit, the 64 bit or the vanilla version
Definition at line 76 of file itkMath.h.