Computes the largest quantity point with integer representation and unit type To with its number not greater than qp
Declared in <mp-units/math.h>
template<
Unit auto To,
auto R,
auto PO,
typename Rep>
[[nodiscard]]
constexpr
QuantityPointOf<quantity_point<R, PO, Rep>::quantity_spec> auto
floor(quantity_point<R, PO, Rep> const& qp) noexcept
requires requires { qp.force_in(To); } &&
((treat_as_floating_point<Rep> && (requires(Rep v) { floor(v); }
#if MP_UNITS_HOSTED
|| requires(Rep v) { std::floor(v); }
#endif
)) ||
(!treat_as_floating_point<Rep> && requires { representation_values<Rep>::one(); }));
QuantityPoint The rounded quantity point with unit type To
The return value should not be discarded.
| Name | Description |
|---|---|
| qp | QuantityPoint being the base of the operation |