stephtr / qalculator

Progressive Web app for calculating the awesome way
https://qalculator.xyz/
24 stars 4 forks source link

Please add the ability to import custom units from a file #10

Open vlad2305m opened 1 year ago

stephtr commented 1 year ago

What would be your use case? Would it be actually sufficient to have persistent variable/function definitions using the var := 10 m syntax (since implementation wise that would be easier)?

Edit: Qalculator now actually supports entering "customConstant := 1.2345" in the additional settings. If you have a use case not supported by this, feel free to reopen.

vlad2305m commented 1 year ago

I tried using the variables, and it works, but it still would be useful to have the SI prefixes and mixed units. I only have 1 custom quality, so it's ok, but defining 2 is not possible with variables alone, so I think you should add this somewhere to your to-do list.

stephtr commented 1 year ago

Ok. You probably anyway know, but until that you could also define variations of your unit including the SI prefixes as separate variables. But yes, that's not the best way to go.