DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions
DGtal::functors::Abs< T > Struct Template Reference

#include <DGtal/base/BasicFunctors.h>

Public Member Functions

operator() (const T &x) const
 

Detailed Description

template<class T = void>
struct DGtal::functors::Abs< T >

Abs functor.

Definition at line 93 of file BasicFunctors.h.

Member Function Documentation

◆ operator()()

template<class T = void>
T DGtal::functors::Abs< T >::operator() ( const T &  x) const
inline

Definition at line 96 of file BasicFunctors.h.

97 {
98 if (x < 0)
99 return -x;
100 else
101 return x;
102 }

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