名前空間
変種
操作

std::imag(std::complex)

提供: cppreference.com
< cpp‎ | numeric‎ | complex
 
 
 
 
ヘッダ <complex> で定義
(1)
template< class T >
T imag( const std::complex<T>& z );
(C++14未満)
template< class T >
constexpr T imag( const std::complex<T>& z );
(C++14以上)
(2)
float imag( float z );

template< class DoubleOrInteger >
double imag( DoubleOrInteger z );

long double imag( long double z );
(C++11以上)
(C++14未満)
constexpr float imag( float z );

template< class DoubleOrInteger >
constexpr double imag( DoubleOrInteger z );

constexpr long double imag( long double z );
(C++14以上)
1) 複素数 z の虚部、すなわち z.imag() を返します。
2) float, double, long double およびすべての整数型に対する追加のオーバーロードが提供されます。 これらの型は虚部がゼロの複素数として扱われます。
(C++11以上)

[編集] 引数

z - 複素数の値

[編集] 戻り値

z の虚部。

[編集] 関連項目

複素数の虚部にアクセスします
(パブリックメンバ関数) [edit]
実部を返します
(関数テンプレート) [edit]