1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 16:03:14 +08:00

Better number formatting

This commit is contained in:
Thomas Müller 2017-07-09 19:40:57 +03:00
parent 1f425c3be8
commit 934a585b94

View File

@ -161,8 +161,8 @@ namespace osu.Desktop.VisualTests.Tests
currentTimingPoint.Value = timingPoints.IndexOf(timingPoint) + 1; currentTimingPoint.Value = timingPoints.IndexOf(timingPoint) + 1;
beatCount.Value = calculateBeatCount(timingPoint); beatCount.Value = calculateBeatCount(timingPoint);
currentBeat.Value = beatIndex + 1; currentBeat.Value = beatIndex + 1;
beatsPerMinute.Value = (float)Math.Round(60000 / timingPoint.BeatLength, 1); beatsPerMinute.Value = 60000 / timingPoint.BeatLength;
adjustedBeatLength.Value = (float)timingPoint.BeatLength; adjustedBeatLength.Value = timingPoint.BeatLength;
flashLayer.ClearTransforms(); flashLayer.ClearTransforms();
flashLayer.FadeTo(1); flashLayer.FadeTo(1);
@ -177,9 +177,9 @@ namespace osu.Desktop.VisualTests.Tests
private readonly OsuSpriteText valueText; private readonly OsuSpriteText valueText;
public float Value public double Value
{ {
set { valueText.Text = value.ToString(); } set { valueText.Text = $"{value:G}"; }
} }
public InfoString(string header) public InfoString(string header)