mp_units::clamp_non_negative::operator()

Clamps v to zero if it is negative.

Synopsis

Declared in <mp-units/overflow_policies.h>

template<Quantity V>
constexpr
V
operator()(V v) const;

Return Value

v if it is non-negative, otherwise zero

Parameters

NameDescription
vthe value to clamp