[#mp_units-floor] = xref:mp_units.adoc[mp_units]::floor :relfileprefix: ../ :mrdocs: Computes the largest quantity with integer representation and unit type To with its number not greater than q == Synopsis Declared in `<mp‐units/math.h>` [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>] floor(xref:mp_units/quantity-01.adoc[quantity<R, Rep>] const& q) noexcept requires requires { q.force_in(To); } && ((treat_as_floating_point<Rep> && (requires(Rep v) { floor(v); } || requires(Rep v) { std::floor(v); })) || (!treat_as_floating_point<Rep> && requires { representation_values<Rep>::one(); })); ---- == Return Value Quantity The rounded quantity with unit type To == Template Parameters [cols=2] |=== | Name | Description | *q* | Quantity being the base of the operation |=== == Parameters [cols=2] |=== | Name | Description | *q* | A quantity |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#