mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Round pp values to nearest integer.
This commit is contained in:
parent
a0e6226b7a
commit
e845cc92b8
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
@ -27,7 +28,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
{
|
||||
if (score.PP.HasValue)
|
||||
{
|
||||
performance.Value = (int)score.PP.Value;
|
||||
performance.Value = (int)Math.Round(score.PP.Value, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -35,7 +36,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
|
||||
.ContinueWith(t => Schedule(() =>
|
||||
{
|
||||
if (t.Result.HasValue)
|
||||
performance.Value = (int)t.Result.Value;
|
||||
performance.Value = (int)Math.Round(t.Result.Value, MidpointRounding.AwayFromZero);
|
||||
}), cancellationTokenSource.Token);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user