Skip to content

feat(/convert): complex types #201

@kyranet

Description

@kyranet

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³/mincm³/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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions