Module dimensioned::dimensioned
[−]
[src]
This module allows dimensioned to be very flexible. It creates the Dim<D, V> type,
which is the type that will be used with all dimensionful objects. It then implements as
many traits from std as generically as possible.
dimensioned creates many traits, the majority of which are used for type level **arithmetic and should not be implemented for any objects outside this library.
Structs
| Dim |
This is the primary struct that users of this library will interact with. |
Traits
| Cbrt |
Because it would not make sense to implement |
| DimToString |
This trait gives a human-friendly representation of a dimensioned object. It is useful for printing and debugging. |
| Dimension |
All types created for a unit system will implement this trait. |
| Dimensionless |
The only types that implement this trait are the |
| DivDim |
This trait allows us to divide two dimensioned objects |
| InvertDim |
This trait inverts the dimensions of an object. For example, it takes seconds to hertz. |
| KeepDim |
This trait enforces that |
| MulDim |
This trait allows us to multiply two dimensioned objects |
| NotDim |
This traits is implemented by default for everything that is not Dim |
| Pow |
Generic integer powers using peano numbers.
No other types should implement it.
Example:
|
| PowerDim |
This trait allows us to take a dimensioned object to a power given by a peano number |
| Root |
Generic roots using peano numbers.
No other types should implement it.
Example:
|
| RootDim |
This trait allows us to take a root, given by a peano number, of a dimensioned object |
| Sqrt |
Because it would not make sense to implement |