All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
TNT Namespace Reference

Functions

template<class Real >
Real hypot (const Real &a, const Real &b)
 

Function Documentation

template<class Real >
Real TNT::hypot ( const Real &  a,
const Real &  b 
)
Returns
hypotenuse of real (non-complex) scalars a and b by avoiding underflow/overflow using (a * sqrt( 1 + (b/a) * (b/a))), rather than sqrt(a*a + b*b).

Definition at line 18 of file tnt_math_utils.h.