wolph / alfred-converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculator and Wolfram Alpha.
93 stars 15 forks source link

Would be nice to be able to do simple math #43

Closed videopilot closed 1 year ago

videopilot commented 2 years ago

For example:

(1314.65 * 3) mm to in

Just because I often have to jump back to the main Alfred calculator, copy the result, and then open again to plug that into the conversion.

wolph commented 1 year ago

The issue here is actually with the parentheses because this is supported out of the box. To illustrate:

image

But I suppose it should be possible to get it working with the parentheses as well. The short story is... simple multiplications/additions get simplified to a single number so typing 10 + 20 x automatically collapses to 30 x internally. But when you add parentheses it goes into math mode which also supports functions such as sine/cosine/etc. and in that mode it does not look at units anymore

wolph commented 1 year ago

The new version now also supports calculations for units:

image image