microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.01k stars 6.48k forks source link

Unit converter: Allow fractions as input #25036

Open Antyos opened 1 year ago

Antyos commented 1 year ago

Description of the new feature / enhancement

It would be convenient to allow fractions as input for the unit converter.

For example:

%% 1/2 in to mm
12.7 mm

Currently, the only way to accomplish this is by first converting the fraction to decimal, and then running:

%% 0.5 in to mm
12.7 mm

Further suggestions: It could also be helpful to allow other math operations as input to the unit converter such as:

%% 0.5 + 7/16 in to mm
23.812 mm

Or even mixing and matching units in math, such as

%% 10 mm + 0.5 in to mm
22.7 mm

Scenario when this would be used?

Units like inches commonly use fractional denominations, such as 1/2, 5/8, 3/4, etc. It would be helpful to be able to input a fraction directly into the unit converter instead of having to take an extra step of converting the fraction to a decimal.

Supporting information

Performing unit conversions in Windows Search supports fractions and mixed units, such as 1/2 in to mm or 10 mm + 0.5 in to mm. However, it is (sometimes) slow and requires an internet connection. It would be nice if PowerToys supported this natively too.

jkmgeo commented 1 year ago

Adding another use case here -- chefs! Unfortunately, some of us are still subject to things like baking by non-metric volume.

We already have to use the full UnitsNet names for non-unique measures, so minimizing the amount of formatting requirements to remember -- e.g., 0.333 UsTablespoon in ml not 1/3 UsTablespoon to ml -- would be nice. (As might a change that did "fuzzy" matching so, for example, Tbsp returned multiple results, one for each kind of tablespoon in UnitsNet...but that's a separate GH issue!)