mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +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:
@ -90,7 +90,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
placeholder.FadeOut(fade_duration, Easing.Out);
|
||||
|
||||
graph.DefaultValueCount = ranks.Length;
|
||||
graph.Values = ranks.Select(x => -(float)Math.Log(x.Value));
|
||||
graph.Values = ranks.Select(x => -MathF.Log(x.Value));
|
||||
}
|
||||
|
||||
graph.FadeTo(ranks.Length > 1 ? 1 : 0, fade_duration, Easing.Out);
|
||||
@ -187,7 +187,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
|
||||
public void HideBar() => bar.FadeOut(fade_duration);
|
||||
|
||||
private int calculateIndex(float mouseXPosition) => (int)Math.Round(mouseXPosition / DrawWidth * (DefaultValueCount - 1));
|
||||
private int calculateIndex(float mouseXPosition) => (int)MathF.Round(mouseXPosition / DrawWidth * (DefaultValueCount - 1));
|
||||
|
||||
private Vector2 calculateBallPosition(int index)
|
||||
{
|
||||
|
Reference in New Issue
Block a user