mirror of
https://github.com/ppy/osu
synced 2024-12-16 20:05:41 +00:00
Inline percentage calculation
This commit is contained in:
parent
80f24a0791
commit
a3f3dcf853
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user