[#mp_units-abs] = xref:mp_units.adoc[mp_units]::abs :relfileprefix: ../ :mrdocs: Computes the absolute value of a quantity == Synopsis Declared in `<mp‐units/math.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< auto R, typename Rep> requires requires(Rep v) { abs(v); } || requires(Rep v) { std::abs(v); } [[nodiscard]] constexpr xref:mp_units/quantity-01.adoc[quantity<R, Rep>] abs(xref:mp_units/quantity-01.adoc[quantity<R, Rep>] const& q) noexcept; ---- == Return Value Quantity The absolute value of a provided quantity == Parameters [cols=2] |=== | Name | Description | *q* | Quantity being the base of the operation |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#