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::Trunc< T > Struct Template Reference

Functor that rounds towards zero. More...

#include <DGtal/base/BasicFunctors.h>

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

Public Member Functions

auto operator() (const T &value) const -> decltype(std::trunc(value))

Detailed Description

template<typename T = void>
struct DGtal::functors::Trunc< T >

Functor that rounds towards zero.

Template Parameters
TType to be rounded. If not specified (void), the type is deduced at evaluation.

Definition at line 250 of file BasicFunctors.h.

Member Function Documentation

◆ operator()()

template<typename T = void>
auto DGtal::functors::Trunc< T >::operator() ( const T & value) const -> decltype(std::trunc(value))
inline

Definition at line 253 of file BasicFunctors.h.

255 {
256 return std::trunc( value );
257 }
Functor that rounds towards zero.

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