morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::units::QuantityBounds Struct Reference

Optional physical/wire bounds for one unit: the inclusive range a decoded value must fall within to be accepted. Returned by the optional UnitTraits<E>::bounds(E) customisation point (detected by HasUnitBounds) — e.g. a percentage unit bounding itself to [0, 100], or a mass unit rejecting a negative reading no scale can physically produce. Absent by default: a unit with no declared bounds accepts any value its precision allows, exactly as before this feature existed. More...

#include <quantity.hpp>

Public Attributes

morph::math::Rational min
 Inclusive lower bound.
morph::math::Rational max
 Inclusive upper bound.

Detailed Description

Optional physical/wire bounds for one unit: the inclusive range a decoded value must fall within to be accepted. Returned by the optional UnitTraits<E>::bounds(E) customisation point (detected by HasUnitBounds) — e.g. a percentage unit bounding itself to [0, 100], or a mass unit rejecting a negative reading no scale can physically produce. Absent by default: a unit with no declared bounds accepts any value its precision allows, exactly as before this feature existed.

Definition at line 261 of file quantity.hpp.

Member Data Documentation

◆ min

morph::math::Rational morph::units::QuantityBounds::min

Inclusive lower bound.

Definition at line 263 of file quantity.hpp.

◆ max

morph::math::Rational morph::units::QuantityBounds::max

Inclusive upper bound.

Definition at line 265 of file quantity.hpp.


The documentation for this struct was generated from the following file: