JordanLeich / Ultimate-Calculator

This is an incredibly powerful calculator and converter that is capable of many useful day-to-day functions that typical calculators cannot perform.
MIT License
42 stars 10 forks source link

Simplify unit conversions #43

Closed PeanutbutterWarrior closed 3 years ago

PeanutbutterWarrior commented 3 years ago

I've changed how unit conversions work, removing almost all of the repetition between functions. Adding new conversions and new units is now much easier, only changing a single dictionary. Instructions for doing this are at the top of conversions/conversions.py::unit_converter(). I have left the cryptocurrency alone, as I expect that this could be updated to use an api, however this can be added easily.