I'm having an hard time figuring an efficient way to converts differents types of unit to various other types.
Switch cases would work, but IMO that's not an efficient way has I will have 3 different Systems (SI, Imperial and US).
My converter (inside my app) will always convert from SI to something or from something to SI. It kinds of lower the complexity, but yet I still need advice on how to make clean code.
I had defined that my input parameters for conversion would be Value(number) and Unit(string).
I would have 2 functions. SIToSomething(value, unit) and SOmethingToSi(value, unit).
Unit is defined because I would be converting length, weight, qty etc..
What would you suggest ?