mp_units::sqrt¶
Computes the square root of a quantity
Synopsis¶
Declared in <mp-units/math.h>
template<auto R, typename Rep>
requires requires(Rep v) { sqrt(v); }
#if MP_UNITS_HOSTED
|| requires(Rep v) { std::sqrt(v); }
[[nodiscard]] constexpr quantity<sqrt(R), Rep> sqrt(quantity<R, Rep> const& q) noexcept;
Description¶
Both the quantity value and its quantity specification are the base of the operation.
Return Value¶
Quantity The result of computation
Note
The return value should not be discarded.
Parameters¶
| Name | Description |
|---|---|
| q | Quantity being the base of the operation |