PutridParrot.Fractions
1.0.1-alpha
dotnet add package PutridParrot.Fractions --version 1.0.1-alpha
NuGet\Install-Package PutridParrot.Fractions -Version 1.0.1-alpha
<PackageReference Include="PutridParrot.Fractions" Version="1.0.1-alpha" />
paket add PutridParrot.Fractions --version 1.0.1-alpha
#r "nuget: PutridParrot.Fractions, 1.0.1-alpha"
// Install PutridParrot.Fractions as a Cake Addin
#addin nuget:?package=PutridParrot.Fractions&version=1.0.1-alpha&prerelease
// Install PutridParrot.Fractions as a Cake Tool
#tool nuget:?package=PutridParrot.Fractions&version=1.0.1-alpha&prerelease
PutridParrot.Fractions
A simple Fractions class/library. Includes several constructors which allow passing of the numerator, denominator or a decimal point value which is converted to fractional or a string which is converted from a decimal representation or fractional representation.
Includes comparison operators, mathematical operations, can be cast to a decimal point number.
Note: Will update to use .NET 7's INumber interface when that's released.
Usage
Install the latest package from nuget, for example by running
dotnet add package PutridParrot.Fractions --version 1.0.1-alpha
In usages we simply use something like the following
using PutridParrot.Fractions;
var fraction1 = new Fraction(1, 2);
var fraction2 = new Fraction(10, 20);
if (fraction1 == fraction2)
{
// they are equivalent
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1-alpha | 102 | 9/29/2022 |
1.0.0-alpha | 94 | 9/28/2022 |