cisst-saw
Loading...
Searching...
No Matches
vctBinaryOperations< _outputType, _input1Type, _input2Type >::ClipIn Class Reference

Return the -input2 in input1 is lesser than -input2, input2 if input 1 is greater than input2 and input1 otherwise. The operator doesn't test if input2 is negative. More...

#include <vctBinaryOperations.h>

Public Types

typedef _outputType OutputType

Static Public Member Functions

static const OutputType Operate (const OutputType &bound, const OutputType &input)
static OutputType NeutralElement (void)

Detailed Description

template<class _outputType, class _input1Type = _outputType, class _input2Type = _outputType>
class vctBinaryOperations< _outputType, _input1Type, _input2Type >::ClipIn

Return the -input2 in input1 is lesser than -input2, input2 if input 1 is greater than input2 and input1 otherwise. The operator doesn't test if input2 is negative.

See also
vctBinaryOperations input1 capped in range [-input2, input2]. Note that here all arguments are of the same type, because they have to be compared.

Member Typedef Documentation

◆ OutputType

template<class _outputType, class _input1Type = _outputType, class _input2Type = _outputType>
typedef _outputType vctBinaryOperations< _outputType, _input1Type, _input2Type >::ClipIn::OutputType

Member Function Documentation

◆ NeutralElement()

template<class _outputType, class _input1Type = _outputType, class _input2Type = _outputType>
OutputType vctBinaryOperations< _outputType, _input1Type, _input2Type >::ClipIn::NeutralElement ( void )
inlinestatic

◆ Operate()

template<class _outputType, class _input1Type = _outputType, class _input2Type = _outputType>
const OutputType vctBinaryOperations< _outputType, _input1Type, _input2Type >::ClipIn::Operate ( const OutputType & bound,
const OutputType & input )
inlinestatic

Execute the operation.

Parameters
input1First operand.
input2Second operand.

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