std::
abs
(std::complex)
From cppreference.com
<
cpp
|
numeric
|
complex
C++
Language
Standard library headers
Concepts
Utilities library
Strings library
Containers library
Algorithms library
Iterators library
Numerics library
Input/output library
Localizations library
Regular expressions library
(C++11)
Atomic operations library
(C++11)
Thread support library
(C++11)
Numerics library
Common mathematical functions
Floating-point environment
Complex numbers
Numeric arrays
Pseudo-random number generation
Compile-time rational arithmetic
(C++11)
Generic numeric operations
iota
(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
std::complex
Member functions
complex::complex
complex::operator=
complex::real
complex::imag
complex::operator+=
complex::operator-=
complex::operator*=
complex::operator/=
Non-member functions
operator+
operator-
operator+
operator-
operator*
operator/
operator==
operator!=
operator<<
operator>>
real
imag
abs
arg
norm
conj
proj
(C++11)
polar
Exponential functions
exp
log
log10
Power functions
pow
sqrt
Trigonometric functions
sin
cos
tan
asin
(C++11)
acos
(C++11)
atan
(C++11)
Hyperbolic functions
sinh
cosh
tanh
asinh
(C++11)
acosh
(C++11)
atanh
(C++11)
Defined in header
<complex>
template
<
class
T
>
T abs
(
const
complex
<
T
>
&
z
)
;
Returns the magnitude of the complex number
z
.
[
edit
]
Parameters
z
-
complex value
[
edit
]
Return value
the magnitude of
z
[
edit
]
See also
arg
returns the phase angle
(function template)