mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Use MathF instead of Math- functions when possible
MathF-functions are faster than the Math-counterpart and it looks cleaner, so use MathF when we cast to float or int anyway.
This commit is contained in:
@ -57,7 +57,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
|
||||
groups.Add(g);
|
||||
nextGroupName++;
|
||||
|
||||
if (i < (int)Math.Ceiling(numGroups / 2f))
|
||||
if (i < (int)MathF.Ceiling(numGroups / 2f))
|
||||
topGroups.Add(g);
|
||||
else
|
||||
bottomGroups.Add(g);
|
||||
|
@ -100,7 +100,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
||||
var diff = Math.Max(score1.Value, score2.Value) - Math.Min(score1.Value, score2.Value);
|
||||
|
||||
losingBar.ResizeWidthTo(0, 400, Easing.OutQuint);
|
||||
winningBar.ResizeWidthTo(Math.Min(0.4f, (float)Math.Pow(diff / 1500000f, 0.5) / 2), 400, Easing.OutQuint);
|
||||
winningBar.ResizeWidthTo(Math.Min(0.4f, MathF.Pow(diff / 1500000f, 0.5f) / 2), 400, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
Reference in New Issue
Block a user