mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Document GetLastObjectTime()
exception on empty beatmap
This commit is contained in:
parent
2b83e6bc4c
commit
e4418547fe
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
@ -129,6 +130,7 @@ namespace osu.Game.Beatmaps
|
|||||||
///
|
///
|
||||||
/// It's not super efficient so calls should be kept to a minimum.
|
/// It's not super efficient so calls should be kept to a minimum.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
/// <exception cref="InvalidOperationException">If <paramref name="beatmap"/> has no objects.</exception>
|
||||||
public static double GetLastObjectTime(this IBeatmap beatmap) => beatmap.HitObjects.Max(h => h.GetEndTime());
|
public static double GetLastObjectTime(this IBeatmap beatmap) => beatmap.HitObjects.Max(h => h.GetEndTime());
|
||||||
|
|
||||||
#region Helper methods
|
#region Helper methods
|
||||||
|
Loading…
Reference in New Issue
Block a user