Provides the System.MathF for .NET Standard 2.0
$ dotnet add package Microsoft.Bcl.NumericsAs of .NET Core 2.0 and .NET Standard 2.1, the C# language has support for math (System.MathF) functions with floats. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support.
using System;
internal static class Program
{
private static async Task Main()
{
Console.WriteLine(MathF.Max(1f, 5f)); // returns 5f
}
}
The main types provided by this library are:
System.MathFMicrosoft.Bcl.Numerics is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.