File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
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: