LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Static Public Member Functions | List of all members
ndarray::detail::SafeFloatingPointOps< T > Struct Template Reference

#include <types.h>

Static Public Member Functions

static T divide (T a, T b)
 
static T abs (T a)
 

Detailed Description

template<typename T>
struct ndarray::detail::SafeFloatingPointOps< T >

Definition at line 124 of file types.h.

Member Function Documentation

template<typename T >
static T ndarray::detail::SafeFloatingPointOps< T >::abs ( a)
inlinestatic

Definition at line 134 of file types.h.

134  {
135  return (a < static_cast<T>(0)) ? -a : a;
136  }
template<typename T >
static T ndarray::detail::SafeFloatingPointOps< T >::divide ( a,
b 
)
inlinestatic

Definition at line 126 of file types.h.

126  {
127  if (b < static_cast<T>(1) && a > b*std::numeric_limits<T>::max())
128  return std::numeric_limits<T>::max();
129  if (a == static_cast<T>(0) || (b > static_cast<T>(1) && a < b*std::numeric_limits<T>::min()))
130  return static_cast<T>(0);
131  return a / b;
132  }
afw::table::Key< double > b

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