use CannyFastMath in various places even where it might not be any different
also update a bunch of packages clean up redundant YamlDotNet references
This commit is contained in:
@@ -35,16 +35,6 @@ namespace Content.Tests.Shared.Chemistry
|
||||
Assert.AreEqual(expected, $"{result}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("1.001", "1")]
|
||||
[TestCase("0.999", "1")]
|
||||
public void ReagentUnitDecimalTests(string valueAsString, string expected)
|
||||
{
|
||||
var value = decimal.Parse(valueAsString);
|
||||
var result = ReagentUnit.New(value);
|
||||
Assert.AreEqual(expected, $"{result}");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("1.005", "1.01")]
|
||||
[TestCase("0.999", "1")]
|
||||
@@ -116,7 +106,7 @@ namespace Content.Tests.Shared.Chemistry
|
||||
[TestCase(2.005f, 201)]
|
||||
public void FloatRoundingTest(float a, int expected)
|
||||
{
|
||||
var result = (int) Math.Round(a * (float) Math.Pow(10, 2), MidpointRounding.AwayFromZero);
|
||||
var result = (int) MathF.Round(a * (float) MathF.Pow(10, 2), MidpointRounding.AwayFromZero);
|
||||
Assert.AreEqual(expected, result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user