inverse overloads
Declared in <mp-units/framework/dimension.h>
Computes the inverse of a dimension.
[[nodiscard]]
consteval
Unit auto
inverse(auto d);
» more...
Computes the inverse of a reference
[[nodiscard]]
consteval
/* implementation-defined */
inverse(reference r);
» more...
Computes the inverse of a quantity in a provided unit
template<
Unit auto To,
auto R,
typename Rep>
[[nodiscard]]
constexpr
Quantity auto
inverse(quantity<R, Rep> const& q)
requires requires {
representation_values<Rep>::one();
value_cast<To>(representation_values<Rep>::one() / q);
};
» more...
dimension_one / dq, expressed in unit ToThe return value should not be discarded.
| Name | Description |
|---|---|
| d | the dimension to invert |
| r | reference being inverted |
| q | the quantity to invert |