Small owning numeric snapshot whose public operations preserve its finite range invariant. No scene, widget, callback or mutable alias is retained. Values between user ticks are valid.
More...
#include <numeric.hpp>
Small owning numeric snapshot whose public operations preserve its finite range invariant. No scene, widget, callback or mutable alias is retained. Values between user ticks are valid.
◆ create()
- Parameters
-
| initial | Explicit finite value in the inclusive range; never clamped or rounded. |
| range | Finite ordered bounds and a positive representable user increment. |
- Returns
- Valid owning value or the first allocation-free numeric validation cause.
◆ operator==()
| bool portals::NumericValue::operator== |
( |
const NumericValue & | other | ) |
const |
|
default |
- Parameters
-
| other | Complete owning snapshot to compare. |
- Returns
- True when value and range are equal.
◆ range()
- Returns
- An owning copy of the validated bounds and user increment.
◆ value()
| double portals::NumericValue::value |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- The finite numeric value, with no owner or thread dependency.
◆ withValue()
- Parameters
-
| candidate | Finite replacement within these bounds; no snapping is performed. |
- Returns
- New owning value or the original numeric cause; this value never changes.
The documentation for this class was generated from the following file: