I am looking for an API to convert from one unit system to another. I expect I have not found the correct API?
What I would expect to see is:
varvalue=1.0;varinputSystem=newUnitSystem(newBaseUnits(....));varsiValue=Length.From(value,inputSystem).As(UnitSystem.SI);
I'm not entirely sure what the purpose of the nullable unit types for a given system are. My current code looks like:
varvalue=1.0;varinputSystem=newUnitSystem(newBaseUnits(....));vasiValue=Length.From(value,inputSystem.BaseUnits.Length!.Value).As(UnitSystem.SI);
however this does not extend so well to things like Pressure.
varvalue=1.0;varinputSystem=newUnitSystem(newBaseUnits(....));vasiValue=Pressure.From(value,???).As(UnitSystem.SI);
I am looking for an API to convert from one unit system to another. I expect I have not found the correct API?
What I would expect to see is:
I'm not entirely sure what the purpose of the nullable unit types for a given system are. My current code looks like:
however this does not extend so well to things like Pressure.