UnitConversion alternatives and similar packages
Based on the "Mathematics" category.
Alternatively, view UnitConversion alternatives based on common mentions on social networks and blogs.
-
AngouriMath
New open-source cross-platform symbolic algebra library for C# and F#. Can be used for both production and research purposes. -
WPF-Math
A collection of .NET libraries for rendering mathematical formulae using the LaTeX typesetting style, for the WPF and Avalonia XAML-based frameworks -
Vim.Math3d
A .NET Standard 2.0 library for simple and efficient 3D math that is a feature-rich replacement for System.Numerics https://vimaec.github.io/Math3D -
AutoDiff
A .NET library that provides fast, accurate and automatic differentiation (computes derivative / gradient) of mathematical functions. -
ALGLIB
ALGLIB is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Delphi) and several operating systems (Windows and POSIX, including Linux) [Proprietary] and [Free Edition]
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of UnitConversion or a related project?
README
Unit Conversion
What is it?
An expansible .Net class library with support for all modern platforms
- .Net Framework 4.0+
- .Net Standard 1.3+ (.Net 4.5.1+ and .Net Core)
UnitConversion is designed to be expansible through factories or through concrete converter implementations.
Implementations are currently limited, but include:
Pull requests with custom implementations are welcome! Please have a look through the contributing guidelines and our code of conduct.
Example
double kgValue;
double lbValue;
// Simple programmatic approach to conversion, using string `Synonyms`
var kgToLbs = new MassConverter("kg", "lbs");
kgValue = 452;
lbValue = kgToLbs.LeftToRight(kgValue);
Console.WriteLine("452kg in pounds is " + lbValue);
// Converting both ways is easy
kgValue = kgToLbs.RightToLeft(lbValue);
Console.WriteLine("Converted back: " + kgValue);
// Rounding is part of conversion
lbValue = kgToLbs.LeftToRight(kgValue, 2);
Console.WriteLine("452kg in pounds (to 2 decimal places) is " + lbValue);
// You can easily customise converters to support Synonyms used in
// business logic, such as those stored on a database
kgToLbs.AddSynonym("kg", "MTOW (KG)");
kgValue = 3000;
kgToLbs.UnitLeft = "MTOW (KG)";
lbValue = kgToLbs.LeftToRight(kgValue);
Console.WriteLine("3000 MTOW (KG) in lbs is " + lbValue);
// Add a new unit with a custom conversion factor
kgToLbs.AddUnit("Chuck Norris", 9001);
kgToLbs.UnitRight = "Chuck Norris";
kgValue = 7;
var chucks = kgToLbs.LeftToRight(kgValue);
Console.WriteLine("7kg is equal to " + lbValue + " chucks");
Converters are easy to define and contribute to:
public class DistanceConverter : BaseUnitConverter
{
UnitFactors units = new UnitFactors("m")
{
{ new UnitFactorSynonyms("m", "metre"), 1 },
{ new UnitFactorSynonyms("km", "kilometre"), 0.001 },
{ new UnitFactorSynonyms("cm", "centimetre"), 100 },
{ new UnitFactorSynonyms("mm", "millimetre"), 1000 },
{ new UnitFactorSynonyms("ft", "foot", "feet"), 1250d / 381 },
{ new UnitFactorSynonyms("yd", "yard"), 1250d / 1143 },
{ "mile", 125d / 201168 }, // strings automatically cast to UnitFactorSynonyms
{ new UnitFactorSynonyms("in", "inch"), 5000d / 127 },
};
public DistanceConverter(string leftUnit, string rightUnit)
{
Instantiate(units, leftUnit, rightUnit);
}
public DistanceConverter()
{
Instantiate(units);
}
}
Current Maintainer
Previous maintainers
Many thanks to the original maintainers @Nick-Lucas and @gkampolis for all their hard work.
*Note that all licence references and agreements mentioned in the UnitConversion README section above
are relevant to that project's source code only.