mp_units::imag¶
Customization point object: the imaginary part of a complex value
Synopsis¶
Declared in <mp-units/framework/representation_concepts.h>
inline constexpr /* implementation-defined */ imag;
Description¶
Calls clx.imag(), or imag(clx) found by ADL, and accepts only a result that is real and has the order of clx. Code written for any complex scalar calls it, whichever form the type provides:
// the phase angle of an impedance stored in any complex scalar type
template<typename Complex>
double phase(const Complex& impedance)
{
return std::atan2(mp_units::imag(impedance), mp_units::real(impedance));
}
Return Value¶
the imaginary part of clx
Parameters¶
| Name | Description |
|---|---|
| clx | a complex value |
See Also¶
realfor the real partmodulusfor the modulus- Representation Types in the User's Guide