Policy that clamps the value to [0, ā).]
<mp-units/overflow_policies.h>struct clamp_non_negative;
Saturates negative values to zero. Use when small negative values can arise from floating-point rounding in a naturally non-negative domain (e.g., a computed energy that rounds to ā1eā15 J should be treated as 0 J rather than signalling an error).
| Name |
|---|
operator() |
| Name |
|---|
min |