[#mp_units-inverse-0e] = xref:mp_units.adoc[mp_units]::inverse :relfileprefix: ../ :mrdocs: `inverse` overloads == Synopses Declared in `<mp‐units/framework/dimension.h>` Computes the inverse of a dimension. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval xref:mp_units/Unit.adoc[Unit] auto xref:mp_units/inverse-0d.adoc[inverse](auto d); ---- [.small]#xref:mp_units/inverse-0d.adoc[_» more..._]# Computes the inverse of a reference [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval /* implementation-defined */ xref:mp_units/inverse-0b.adoc[inverse](xref:mp_units/reference-0b2.adoc[reference] r); ---- [.small]#xref:mp_units/inverse-0b.adoc[_» more..._]# Computes the inverse of a quantity in a provided unit [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Unit.adoc[Unit] auto To, auto R, typename Rep> [[nodiscard]] constexpr xref:mp_units/Quantity-0c.adoc[Quantity] auto xref:mp_units/inverse-09.adoc[inverse](xref:mp_units/quantity-01.adoc[quantity<R, Rep>] const& q) requires requires { representation_values<Rep>::one(); value_cast<To>(representation_values<Rep>::one() / q); }; ---- [.small]#xref:mp_units/inverse-09.adoc[_» more..._]# == Return Value * `dimension_one / d` * the result of the computation * the inverse of `q,` expressed in unit `To` [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *d* | the dimension to invert | *r* | reference being inverted | *q* | the quantity to invert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#