1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Remove unnecessary extension

This commit is contained in:
iiSaLMaN 2019-07-08 11:57:02 +03:00
parent b62e69d170
commit 11ef65e3e2

View File

@ -8,7 +8,6 @@ using System.Linq;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using Newtonsoft.Json; using Newtonsoft.Json;
using osu.Game.IO.Serialization.Converters; using osu.Game.IO.Serialization.Converters;
using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Beatmaps namespace osu.Game.Beatmaps
{ {
@ -62,15 +61,4 @@ namespace osu.Game.Beatmaps
{ {
public new Beatmap Clone() => (Beatmap)base.Clone(); public new Beatmap Clone() => (Beatmap)base.Clone();
} }
public static class BeatmapExtensions
{
public static double CalculateLength(this IBeatmap b)
{
HitObject lastObject = b.HitObjects.LastOrDefault();
var endTime = (lastObject as IHasEndTime)?.EndTime ?? lastObject?.StartTime ?? 0;
return endTime - b.HitObjects.FirstOrDefault()?.StartTime ?? 0;
}
}
} }