DGtal  0.9.3beta
Public Member Functions
DGtal::functors::Abs< T > Struct Template Reference

#include <DGtal/base/BasicFunctors.h>

Inheritance diagram for DGtal::functors::Abs< T >:
[legend]
Collaboration diagram for DGtal::functors::Abs< T >:
[legend]

Public Member Functions

operator() (const T &x) const
 

Detailed Description

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

Abs functor.

Definition at line 92 of file BasicFunctors.h.

Member Function Documentation

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

Definition at line 95 of file BasicFunctors.h.

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

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