Inline percentage calculation

This commit is contained in:
Arthur Araujo 2024-03-18 13:27:43 -03:00
parent 80f24a0791
commit a3f3dcf853

View File

@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Edit.Checks
double mappedLength = context.Beatmap.HitObjects.Last().GetEndTime();
double trackLength = context.WorkingBeatmap.Track.Length;
double mappedPercentage = calculatePercentage(mappedLength, trackLength);
double mappedPercentage = Math.Round(mappedLength / trackLength * 100);
if (mappedPercentage < 80)
{
@ -31,11 +31,6 @@ namespace osu.Game.Rulesets.Edit.Checks
}
}
private double calculatePercentage(double mappedLenght, double trackLenght)
{
return Math.Round(mappedLenght / trackLenght * 100);
}
public class IssueTemplateUnusedAudioAtEnd : IssueTemplate
{
public IssueTemplateUnusedAudioAtEnd(ICheck check)