|
dimval 0.2.0
Modern C++23 header-only library of dimensional values (units, measures, ranges)
|
Free-function helpers that preserve unit/measure tags. More...
#include <dimval/measure.hpp>#include <dimval/range.hpp>#include <dimval/traits.hpp>#include <dimval/unit.hpp>
Go to the source code of this file.
Functions | |
| template<UnitLike U, NumericValue T> | |
| constexpr UnitValue< U, T > | dimval::midpoint (const UnitRangeValue< U, T > &r) noexcept |
| Midpoint of a range's bounds. | |
Free-function helpers that preserve unit/measure tags.
abs, min, max, clamp for UnitValue<U,T> and MeasureValue<M,T>, plus a midpoint helper for ranges. Without these, the natural reach is .v — which strips the tag and is the very escape hatch we want to avoid. This header is not in the umbrella; pull it in explicitly.
|
constexprnoexcept |
Midpoint of a range's bounds.
Inclusion is irrelevant — only the bound values matter.