Merge MathHelper and FloatMath

Requires  space-wizards/RobustToolbox#1234
This commit is contained in:
Visne
2020-08-16 14:54:52 +02:00
parent 745f028b89
commit 0b448b500d
18 changed files with 27 additions and 27 deletions

View File

@@ -53,14 +53,14 @@ namespace Content.Server.Atmos
{
if (throwTarget != GridCoordinates.InvalidGrid)
{
var moveForce = maxForce * FloatMath.Clamp(moveProb, 0, 100) / 150f;
var moveForce = maxForce * MathHelper.Clamp(moveProb, 0, 100) / 150f;
var pos = ((throwTarget.Position - transform.GridPosition.Position).Normalized + direction.ToVec()).Normalized;
LinearVelocity = pos * moveForce;
}
else
{
var moveForce = MathF.Min(maxForce * FloatMath.Clamp(moveProb, 0, 100) / 2500f, 20f);
var moveForce = MathF.Min(maxForce * MathHelper.Clamp(moveProb, 0, 100) / 2500f, 20f);
LinearVelocity = direction.ToVec() * moveForce;
}