Skip to content

Commit

Permalink
Added FuelEconomy & DataStorage converters. Also fixed some precision…
Browse files Browse the repository at this point in the history
… issues in the definitions file.
  • Loading branch information
putridparrot committed Jan 5, 2022
1 parent 5e6fdcd commit 12b39cb
Show file tree
Hide file tree
Showing 16 changed files with 3,227 additions and 79 deletions.
6 changes: 4 additions & 2 deletions PutridParrot.Units.Tests/AngleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void FromDegreesToMilliradiansAndBack()
[TestCase(900.0, 15707.969)]
[TestCase(76.0, 1326.45)]
[TestCase(4.5, 78.5398)]
[TestCase(23333.11, 407239.5873)]
public void ConvertKnownDegreesToMilliradians(double input, double expectation)
{
var result = Angle.Degrees.ToMilliradians(input);
Expand Down Expand Up @@ -167,8 +168,8 @@ public void FromGradiansToMilliradiansAndBack()
}

[TestCase(8.1, 127.2348)]
[TestCase(900.0, 14137.2)]
[TestCase(1902.5, 29884.47)]
[TestCase(900.0, 14137.167)]
[TestCase(1902.5, 29884.4)]
public void ConvertKnownGradiansToMilliradians(double input, double expectation)
{
var result = Angle.Gradians.ToMilliradians(input);
Expand Down Expand Up @@ -232,6 +233,7 @@ public void FromMilliradiansToDegreesAndBack()
[TestCase(5.9, 0.338045)]
[TestCase(109.0, 6.24524)]
[TestCase(7009.0, 401.5861)]
[TestCase(407239.5873, 23333.11)]
public void ConvertKnownMilliradiansToDegrees(double input, double expectation)
{
var result = Angle.Milliradians.ToDegrees(input);
Expand Down
Loading

0 comments on commit 12b39cb

Please sign in to comment.