mp_units::inverse¶
Computes the inverse of a quantity in a provided unit
Synopsis¶
Declared in <mp-units/math.h>
template<Unit auto To, auto R, typename Rep>
[[nodiscard]] constexpr Quantity auto inverse(quantity<R, Rep> const& q)
requires UnitOf<MP_UNITS_NTTP_HACK(decltype(To)), dimensionless / get_quantity_spec(R)> && requires {
representation_values<Rep>::one();
value_cast<To>(representation_values<Rep>::one() / q);
};
Return Value¶
Note
The return value should not be discarded.
Parameters¶
| Name | Description |
|---|---|
| q | A quantity |