Skip to main content
.NETFramework4.6.2.NETStandard2.0.NETStandard2.1

Provides the System.MathF for .NET Standard 2.0

Published
Jul 9, 2024
2y ago
Total Downloads
5.7M
5,728,581

Install

dotnet add package Microsoft.Bcl.Numerics --version 9.0.0-preview.6.24327.7
ProductVersions
.NET Standard
netstandard2.0netstandard2.1
Other
.NETFramework4.6.2

README

About

As 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.

Key Features

  • Enables the use of MathF on older .NET platforms

How to Use

using System;

internal static class Program
{
    private static async Task Main()
    {       
        Console.WriteLine(MathF.Max(1f, 5f)); // returns 5f
    }
}

Main Types

The main types provided by this library are:

  • System.MathF

Additional Documentation

Feedback & Contributing

Microsoft.Bcl.Numerics is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Changes from Previous Version

No structural changes between v9.0.0-preview.5.24306.7 and v9.0.0-preview.6.24327.7.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.