libstdc++
std::complex Struct Reference

List of all members.

Public Types

Public Member Functions


Detailed Description

Template to represent complex numbers.

Specializations for float, double, and long double are part of the library. Results with any other type are not guaranteed.

Parameters:
TpType of real and imaginary values.

Member Typedef Documentation

Value typedef.

Definition at line 127 of file complex.


Constructor & Destructor Documentation

constexpr std::complex::complex ( const _Tp &  __r = _Tp(),
const _Tp &  __i = _Tp() 
) [inline]

Default constructor. First parameter is x, second parameter is y. Unspecified parameters default to 0.

Definition at line 131 of file complex.

template<typename _Up >
constexpr std::complex::complex ( const complex< _Up > &  __z) [inline]

Copy constructor.

Definition at line 138 of file complex.


Member Function Documentation

complex<_Tp>& std::complex::operator+= ( const _Tp &  __t) [inline]

Add t to this complex number.

Definition at line 181 of file complex.

complex<_Tp>& std::complex::operator-= ( const _Tp &  __t) [inline]

Subtract t from this complex number.

Definition at line 190 of file complex.


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