Unit to string with history tracking
If a quantity is requested to print its value in a custom unit, e.g. km / hr
, there needs to be a way ask a unit for its initial representation.
This can be implemented by extending the Unit
class, such that every arithmetic operation is recorded and represented with helper storage classes (Mul
, Div
, Pow
), such that a unit can use this information to compile a string using the original prefixed symbols.