mp_units::mag_power¶
The unit magnitude of Base raised to the power Num/Den
Synopsis¶
Declared in <mp-units/framework/unit_magnitude.h>
template<MagArg auto Base, int Num, int Den = 1>
requires detail::is_positive_mag_arg<Base>
constexpr UnitMagnitude auto mag_power = pow<Num, Den>(mag<Base>);
Description¶
A prefix is defined with it, and so is a unit whose factor reads better as a power of ten:
template<PrefixableUnit U>
struct kilo_ final : prefixed_unit<"k", mag_power<10, 3>, U{}> {};
inline constexpr struct nominal_solar_radius final :
named_constant<symbol_text{u8"R_☉ᴺ", "R_SUN_N"},
mag_ratio<6'957, 1'000> * mag_power<10, 8> * si::metre> {} nominal_solar_radius;
Template Parameters¶
| Name | Description |
|---|---|
| Base | the base, a positive integer or a mag_constant |
| Num | the numerator of the exponent |
| Den | the denominator of the exponent |
See Also¶
- Systems of Units in the User's Guide