mp_units::quantity_field¶
Whether a quantity is real or complex
Synopsis¶
Declared in <mp-units/framework/quantity_character.h>
enum class quantity_field : int;
Description¶
Every quantity specification has one, and a constraint can require any complex quantity:
#include <complex>
// a phasor diagram shows only complex quantities
void plot_phasor(QuantityOf<quantity_field::complex> auto z);
plot_phasor(isq::impedance(std::complex{3., 4.} * si::ohm));
// doesn't compile: voltage is real
// plot_phasor(isq::voltage(230. * V));
Members¶
| Name | Description |
|---|---|
real | Real, such as voltage or active power |
complex | Complex, such as impedance or complex power |
See Also¶
quantity_tensor_orderfor whether a quantity is a scalar, a vector, or a tensorquantity_characterfor both axes togethernumeric_fieldfor the field of a representation type- The Character of a Quantity in the User's Guide