mp_units::quantity_tensor_order¶
Whether a quantity is a scalar, a vector, or a tensor
Synopsis¶
Declared in <mp-units/framework/quantity_character.h>
enum class quantity_tensor_order : int;
Description¶
Every quantity specification has one, and a constraint can require, say, any vector quantity:
#include <mp-units/utility/cartesian_vector.h>
// an arrow on a 2D plot can show any vector
void draw_arrow(QuantityOf<quantity_tensor_order::vector> auto v);
draw_arrow(isq::velocity(utility::cartesian_vector{3., 4.} * (m / s)));
// doesn't compile: speed is a scalar
// draw_arrow(isq::speed(5. * m / s));
Members¶
| Name | Description |
|---|---|
scalar | Order 0, such as speed or mass |
vector | Order 1, such as velocity or force |
tensor | Order 2, such as stress or moment of inertia |
See Also¶
quantity_fieldfor whether a quantity is real or complexquantity_characterfor both axes togethertensor_orderfor the order of a representation type- The Character of a Quantity in the User's Guide