Expand description
Traits for working generically with dimensioned
Unless specified otherwise, all of these traits are implemented for the unit systems that come
with dimensioned and with any created by the make_units! macro.
Traits§
- Abs
Absis used for implementing anabs()member for types that can have their absolute value taken (which is most of them).- Cbrt
Cbrtprovides acbrtmember function for types that are not necessarily preserved under cube root.- Dimensioned
- Allows one to refer to quantities generically.
- Dimensionless
- This trait is implemented for all quantities with no units. The unit systems that come with
dimensioned use
Unitless<V>for that type. - Map
- Perform an operation on the contained value.
- MapUnsafe
- Perform an operation on a quantity.
- Recip
Recipis used for implementing arecip()member for types that are not preserved under reciprocal.- Root
Rootis used for implementing general integer roots for types that aren’t necessarily preserved under root.- Sqrt
Sqrtprovides asqrtmember function for types that are not necessarily preserved under square root.