epoc32/include/stdapis/boost/math/complex/fabs.hpp
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
//  (C) Copyright John Maddock 2005.
williamr@2
     2
//  Use, modification and distribution are subject to the
williamr@2
     3
//  Boost Software License, Version 1.0. (See accompanying file
williamr@2
     4
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
williamr@2
     5
williamr@2
     6
#ifndef BOOST_MATH_COMPLEX_FABS_INCLUDED
williamr@2
     7
#define BOOST_MATH_COMPLEX_FABS_INCLUDED
williamr@2
     8
williamr@2
     9
#ifndef BOOST_MATH_HYPOT_INCLUDED
williamr@2
    10
#  include <boost/math/special_functions/hypot.hpp>
williamr@2
    11
#endif
williamr@2
    12
williamr@2
    13
namespace boost{ namespace math{
williamr@2
    14
williamr@2
    15
template<class T> 
williamr@2
    16
inline T fabs(const std::complex<T>& z)
williamr@2
    17
{
williamr@2
    18
   return ::boost::math::hypot(z.real(), z.imag());
williamr@2
    19
}
williamr@2
    20
williamr@2
    21
} } // namespaces
williamr@2
    22
williamr@2
    23
#endif // BOOST_MATH_COMPLEX_FABS_INCLUDED