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:
Tyler Young
2020-06-13 01:28:28 -04:00
parent 916b9a67d8
commit de274de9e3
25 changed files with 71 additions and 66 deletions

View File

@@ -136,7 +136,7 @@ namespace Content.Shared.Chemistry
if(quantity <= 0)
return;
var ratio = (TotalVolume - quantity).Decimal() / TotalVolume.Decimal();
var ratio = (TotalVolume - quantity).Double() / TotalVolume.Double();
if (ratio <= 0)
{
@@ -180,13 +180,13 @@ namespace Content.Shared.Chemistry
}
newSolution = new Solution();
var newTotalVolume = ReagentUnit.New(0M);
var newTotalVolume = ReagentUnit.New(0);
var remainingVolume = TotalVolume;
for (var i = 0; i < _contents.Count; i++)
{
var reagent = _contents[i];
var ratio = (remainingVolume - quantity).Decimal() / remainingVolume.Decimal();
var ratio = (remainingVolume - quantity).Double() / remainingVolume.Double();
remainingVolume -= reagent.Quantity;
var newQuantity = reagent.Quantity * ratio;