Library to handle physical values, dimensions and units.
$ dotnet add package Rca.PhysicalLibrary to handle physical values, dimensions and units.
//Use the helper classes, are provided for each physical dimension.
PhysicalValue myVoltageValue = Voltage.FromMillivolt(7410);
//Use the PhysicalValue constructor and select the unit from the common Units-Enum
PhysicalValue myCurrentValue = new(0.147, PhysicalUnits.Ampere);
//Use the overloaded ToString() method, to print out the value
Console.WriteLine(myVoltageValue);
//Fit the value to the best unit, and print in out with ToString(), also
Console.WriteLine(myCurrentValue.GetFittedPhysicalValue());
// The example displays the following output to the console:
// 7410 mV
// 147 mA
This library is made possible by contributions from:
Rca.Physical is licensed under MIT. Refer to LICENSE for more information.
Contributions are welcome. Fork this repository and send a pull request if you have something useful to add.