Skip to content

mp_units::rounded_down

Rounding policy that rounds towards negative infinity

Synopsis

Declared in <mp-units/framework/rounding.h>

inline constexpr rounded_down_t rounded_down = rounded_down{};

Description

It has the semantics of std::chrono::floor. A conversion to a floating-point representation type doesn't accept it.

quantity distance = (-1234 * m).in(km, rounded_down);  // -2 km

See Also