LibreOffice Module tools (master) 1
Functions
helpers.hxx File Reference
#include <sal/config.h>
#include <sal/types.h>
#include <tools/long.hxx>
#include <cassert>
#include <limits>
#include <type_traits>
Include dependency graph for helpers.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
std::enable_if< std::is_signed< T >::value||std::is_floating_point< T >::value, long >::type MinMax (T nVal, tools::Long nMin, tools::Long nMax)
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, long >::type MinMax (T nVal, tools::Long nMin, tools::Long nMax)
 
sal_uInt32 AlignedWidth4Bytes (sal_uInt32 nWidthBits)
 
tools::Long FRound (double fVal)
 
template<typename T >
std::enable_if< std::is_signed< T >::value, T >::type NormAngle180 (T angle)
 
template<typename T >
NormAngle360 (T angle)
 

Function Documentation

◆ AlignedWidth4Bytes()

sal_uInt32 AlignedWidth4Bytes ( sal_uInt32  nWidthBits)
inline

Definition at line 65 of file helpers.hxx.

References SAL_MAX_UINT32.

◆ FRound()

tools::Long FRound ( double  fVal)
inline

◆ MinMax() [1/2]

template<typename T >
std::enable_if< std::is_signed< T >::value||std::is_floating_point< T >::value, long >::type MinMax ( nVal,
tools::Long  nMin,
tools::Long  nMax 
)
inline

Definition at line 22 of file helpers.hxx.

Referenced by ImplPolygon::ImplPolygon().

◆ MinMax() [2/2]

template<typename T >
std::enable_if< std::is_unsigned< T >::value, long >::type MinMax ( nVal,
tools::Long  nMin,
tools::Long  nMax 
)
inline

Definition at line 42 of file helpers.hxx.

◆ NormAngle180()

template<typename T >
std::enable_if< std::is_signed< T >::value, T >::type NormAngle180 ( angle)
inline

Definition at line 85 of file helpers.hxx.

◆ NormAngle360()

template<typename T >
T NormAngle360 ( angle)
inline

Definition at line 95 of file helpers.hxx.