More FloatMath -> MathHelper from merge.
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Content.Server.AI.Utility.Considerations
|
|||||||
// Previously we used a makeupvalue method although the geometric mean is less punishing for more considerations
|
// Previously we used a makeupvalue method although the geometric mean is less punishing for more considerations
|
||||||
var considerationsCount = context.GetState<ConsiderationState>().GetValue();
|
var considerationsCount = context.GetState<ConsiderationState>().GetValue();
|
||||||
var adjustedScore = MathF.Pow(score, 1 / (float) considerationsCount);
|
var adjustedScore = MathF.Pow(score, 1 / (float) considerationsCount);
|
||||||
return FloatMath.Clamp(adjustedScore, 0.0f, 1.0f);
|
return MathHelper.Clamp(adjustedScore, 0.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Pure]
|
[Pure]
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos
|
|||||||
|
|
||||||
if (moles < gas.GasMolesVisible) continue;
|
if (moles < gas.GasMolesVisible) continue;
|
||||||
|
|
||||||
var data = new GasData(i, (byte) (FloatMath.Clamp01(moles / gas.GasMolesVisibleMax) * 255));
|
var data = new GasData(i, (byte) (MathHelper.Clamp01(moles / gas.GasMolesVisibleMax) * 255));
|
||||||
tileData.Add(data);
|
tileData.Add(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace Content.Server.GameTicking.GamePresets
|
|||||||
player.AttachedEntity?.EnsureComponent<SuspicionRoleComponent>();
|
player.AttachedEntity?.EnsureComponent<SuspicionRoleComponent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var numTraitors = FloatMath.Clamp(readyPlayers.Count / PlayersPerTraitor,
|
var numTraitors = MathHelper.Clamp(readyPlayers.Count / PlayersPerTraitor,
|
||||||
MinTraitors, readyPlayers.Count);
|
MinTraitors, readyPlayers.Count);
|
||||||
|
|
||||||
for (var i = 0; i < numTraitors; i++)
|
for (var i = 0; i < numTraitors; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user