DGtal  1.3.beta
DGtal::functors::LargeTruncationFunctor< Integer > Struct Template Reference

Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (truncation toward zero).
Note that $$|i| \leq |a/b|$$. More...

#include <DGtal/geometry/curves/ArithmeticalDSSConvexHull.h>

## Public Member Functions

Integer operator() (const Integer &a, const Integer &b) const

## Detailed Description

### template<typename Integer> struct DGtal::functors::LargeTruncationFunctor< Integer >

Binary functor that returns the algebraic quotient i of a/b with any fractional part discarded (truncation toward zero).
Note that $$|i| \leq |a/b|$$.

(For a truncation toward negative infinity, see IntegerComputer::floorDiv)

Template Parameters
 Integer a model of integer used to store a and b

Definition at line 101 of file ArithmeticalDSSConvexHull.h.

## ◆ operator()()

template<typename Integer >
 Integer DGtal::functors::LargeTruncationFunctor< Integer >::operator() ( const Integer & a, const Integer & b ) const
inline
Returns
quotient a/b with any fractional part discarded
Parameters
 a numerator b denominator
Precondition
b is not null

Definition at line 112 of file ArithmeticalDSSConvexHull.h.

113  {
114  ASSERT( b != NumberTraits<Integer>::ZERO );
115  return a / b;
116  }

The documentation for this struct was generated from the following file:
DGtal::NumberTraitsImpl< std::decay< Integer >::type >::ZERO
static const std::decay< Integer >::type ZERO
Constant Zero.
Definition: NumberTraits.h:100