Skip to content

Feature request: function to select the "best" unit among a list #59

@adrfantini

Description

@adrfantini

Sometimes you want to convert a given unit to either X, Y or Z, and you need to select the best.
It would be very handy in cases where you need for example to design an UI, and the UI (due for example to client requests) can only have units m and cm, but not for example dm, in or dam.

It is quite simple to convert the unit to all of them, then simply select the first one with value above (or closest to?) your minimum value (prefixMin in unitmath lingo).

This could be a nice little handy feature to be added to this nice little handy library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions