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

@@ -106,13 +106,13 @@ namespace Content.Client.Chat
}
// Lerp to our new vertical offset if it's been modified.
if (FloatMath.CloseTo(_verticalOffsetAchieved - VerticalOffset, 0, 0.1))
if (MathHelper.CloseTo(_verticalOffsetAchieved - VerticalOffset, 0, 0.1))
{
_verticalOffsetAchieved = VerticalOffset;
}
else
{
_verticalOffsetAchieved = FloatMath.Lerp(_verticalOffsetAchieved, VerticalOffset, 10 * args.DeltaSeconds);
_verticalOffsetAchieved = MathHelper.Lerp(_verticalOffsetAchieved, VerticalOffset, 10 * args.DeltaSeconds);
}
var worldPos = _senderEntity.Transform.WorldPosition;
@@ -122,7 +122,7 @@ namespace Content.Client.Chat
var screenPos = lowerCenter - (Width / 2, ContentHeight + _verticalOffsetAchieved);
LayoutContainer.SetPosition(this, screenPos);
var height = FloatMath.Clamp(lowerCenter.Y - screenPos.Y, 0, ContentHeight);
var height = MathHelper.Clamp(lowerCenter.Y - screenPos.Y, 0, ContentHeight);
LayoutContainer.SetSize(this, (Size.X, height));
}