mp_units::abs

Computes the absolute value of a quantity

Synopsis

Declared in <mp-units/math.h>
template<
    auto R,
    typename Rep>
requires requires(Rep v) { abs(v); } || requires(Rep v) { std::abs(v); }
[[nodiscard]]
constexpr
quantity<R, Rep>
abs(quantity<R, Rep> const& q) noexcept;


Return Value

Quantity The absolute value of a provided quantity

Parameters

Name Description
q Quantity being the base of the operation

Created with MrDocs