-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Sadly, in #195, speed conversions were removed. This is because speed is an equation using 2 units: Length / Time.
What complex types aim to do is support more complex types with matching (m³/min ↦ cm³/s, but m³/J doesn't ↦ cm³/s) and sorting (h*cm³ ⟹ cm³*h).
The syntax would be the standard one, using ⋅ and * for multiplications, ÷ and / for divisions. Parentheses would be used to support more complex units.
Lastly, some of the units from the list would also need to define complex types, for example, 1 knot is 0.51444444 m/s, and 1 mach is 343 m/s.
Tip
To convert an unit from a complex unit to another, you may need to convert the unit to SI for each unit. For example, 1 km/h would become 1000 m/h and then 0.27777778 m/s, then the opposite is done for the target unit.