LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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: