mp_units::inverse

Computes the inverse of a quantity in a provided unit

Synopses

Declared in <mp-units/math.h>
[[nodiscard]]
consteval
Unit auto
inverse(auto d);


» more...
[[nodiscard]]
consteval
/* implementation-defined */
inverse(reference);


» 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 (!detail::scaling_overflows_non_zero_values<Rep>(one / get_unit(R), To)) && requires {
    representation_values<Rep>::one();
    value_cast<To>(representation_values<Rep>::one() / q);
  };


» more...

Created with MrDocs