isNan

bool isNan(const Complex &z) noexcept

Determines whether or not a complex number contains a nan value.

Parameters

const Complex &z

A complex number.

Returns

bool

A boolean.

Example

Complex z(NAN, NAN);
std::cout << isNan(z) << "\n";

Output:

1