Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::Kernel::VectorHelper::DividesNonNull< T > Struct Template Reference

Divide functor with result reset to 0 if the denominator is null. More...

#include <VectorHelper.h>

Public Member Functions

 DividesNonNull ()=default
 
operator() (const T &l, const T &r) const
 Returns l/r if r is non-zero, otherwise returns l. More...
 

Detailed Description

template<class T>
struct Mantid::Kernel::VectorHelper::DividesNonNull< T >

Divide functor with result reset to 0 if the denominator is null.

Definition at line 210 of file VectorHelper.h.

Constructor & Destructor Documentation

◆ DividesNonNull()

template<class T >
Mantid::Kernel::VectorHelper::DividesNonNull< T >::DividesNonNull ( )
default

Member Function Documentation

◆ operator()()

template<class T >
T Mantid::Kernel::VectorHelper::DividesNonNull< T >::operator() ( const T &  l,
const T &  r 
) const
inline

Returns l/r if r is non-zero, otherwise returns l.

Definition at line 213 of file VectorHelper.h.


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