[−][src]Module fts_units::quantity
Declares foundational QuantityT<T,U>
struct upon which fts_units is built.
QuantityT<T,U>
defines a Quantity
which stores an amount
of type T
with units type U
. Mathematical operations with QuantityT<T,U>
values produces new types of QuantityT
with a different U
type.
If U
is zero sized then all the type checking done and compile time and boils down to nothing. No run-time overhead for either CPU or memory.
Mathematical operations for QuantityT<T,U>
are defined so long as they are independently defined for both T
and U
.
Structs
QuantityT | Foundational struct used by all run-time quantities. |
Traits
Amount | Must be implemented for |
CastAmount | Helpers for casting |
ConvertUnits | Helper for converting units. For example from Meters to Kilometers. |
Quantity | Helper for performing generic computations with |