Public Member Functions | Private Attributes | List of all members
blaze::Clamp< DT > Struct Template Reference

Generic wrapper for the clamp() function. More...

#include <Clamp.h>

Public Member Functions

 Clamp (const DT &min, const DT &max)
 Constructor of the Clamp functor. More...
 
template<typename T >
decltype(auto) BLAZE_ALWAYS_INLINE operator() (const T &a) const
 Returns the result of the clamp() function for the given object/value. More...
 

Private Attributes

DT min_
 The lower delimiter.
 
DT max_
 The upper delimiter.
 

Detailed Description

template<typename DT>
struct blaze::Clamp< DT >

Generic wrapper for the clamp() function.

Constructor & Destructor Documentation

◆ Clamp()

template<typename DT >
blaze::Clamp< DT >::Clamp ( const DT &  min,
const DT &  max 
)
inlineexplicit

Constructor of the Clamp functor.

Parameters
minThe lower limit of the range.
maxThe upper limit of the range.

Member Function Documentation

◆ operator()()

template<typename DT >
template<typename T >
decltype(auto) BLAZE_ALWAYS_INLINE blaze::Clamp< DT >::operator() ( const T &  a) const
inline

Returns the result of the clamp() function for the given object/value.

Parameters
aThe given object/value.
Returns
The result of the clamp() function for the given object/value.

The documentation for this struct was generated from the following file: