[#mp_units-round-01] = xref:mp_units.adoc[mp_units]::round :relfileprefix: ../ :mrdocs: `round` overloads == Synopses Declared in `<mp‐units/math.h>` Computes the nearest quantity with integer representation and unit type `To` to `q` [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-01.adoc[quantity<detail::clone_reference_with<To>(R), Rep>] xref:mp_units/round-0e.adoc[round](xref:mp_units/quantity-01.adoc[quantity<R, Rep>] const& q) noexcept requires requires { mp_units::floor<To>(q); representation_values<Rep>::one(); } && std::constructible_from<std::int64_t, Rep>; ---- [.small]#xref:mp_units/round-0e.adoc[_» more..._]# Computes the nearest quantity point with integer representation and unit type `To` to `qp` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:mp_units/Unit.adoc[Unit] auto To, auto R, auto PO, typename Rep> [[nodiscard]] constexpr xref:mp_units/QuantityPointOf.adoc[QuantityPointOf<quantity_point<R, PO, Rep>::quantity_spec>] auto xref:mp_units/round-0c.adoc[round](xref:mp_units/quantity_point-08.adoc[quantity_point<R, PO, Rep>] const& qp) noexcept requires requires { mp_units::floor<To>(qp); representation_values<Rep>::one(); } && std::constructible_from<std::int64_t, Rep>; ---- [.small]#xref:mp_units/round-0c.adoc[_» more..._]# == Return Value * Quantity The quantity rounded to the nearest unit `To`, rounding to even in halfway cases. * QuantityPoint The quantity rounded to the nearest unit `To`, rounding to even in halfway cases. == Template Parameters [cols="1,4"] |=== | Name| Description | *q* | Quantity being the base of the operation |=== == Parameters [cols="1,4"] |=== | Name| Description | *qp* | Quantity point being the base of the operation |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#