QuantityTypes

Provides strongly typed arithmetics of physical quantities, implemented as value types. The library supports parsing, formatting, operators and unit conversion.


Keywords
conversion, measurement, of, physical, quantities, unit, units
License
MIT
Install
Install-Package QuantityTypes -Version 1.0.72

Documentation

QuantityTypes

Features

Examples

using QuantityTypes;
Length s = 100 * Length.Metre;
Time t = 9.58 * Time.Second;
Velocity v = s / t;
Console.WriteLine(v); 
Console.WriteLine(v.ToString("0.00[km/h]")); 
Console.WriteLine("Speed: {0:0.00[!km/h] kmph}", v);
Mass m = Mass.Parse("92 kg");
double massInPounds = m / Mass.Pound;
Temperature temp = 100 * Temperature.DegreeCelsius;
double tempInFahrenheit = temp.ConvertTo(Temperature.DegreeFahrenheit);