Use SortedList + BinarySearch to find control points at time values.

This commit is contained in:
smoogipooo
2017-05-23 15:20:32 +09:00
parent 6bfd7e0fb0
commit 002a0e99a2
6 changed files with 54 additions and 26 deletions

View File

@ -1,13 +1,17 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
namespace osu.Game.Beatmaps.ControlPoints
{
public class ControlPoint
public class ControlPoint : IComparable<ControlPoint>
{
/// <summary>
/// The time at which the control point takes effect.
/// </summary>
public double Time;
public int CompareTo(ControlPoint other) => Time.CompareTo(other.Time);
}
}