Name

imag function template — Returns imaginary part

Synopsis

template<typename T> T imag(const complex<T>& z)

The imag function returns the imaginary part of z, that is, z.imag( ).

See Also

abs function in <cmath>

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.