From a754dc6d3b4d4fc2d02b58f7e68284f92710025a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Oct 2022 14:34:07 +0900 Subject: [PATCH] Expose binary search methods publicly Co-authored-by: Dan Balasescu --- osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs b/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs index cfe3c671ac..9186685f0c 100644 --- a/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs +++ b/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs @@ -196,7 +196,7 @@ namespace osu.Game.Beatmaps.ControlPoints /// The time to find the control point at. /// The control point to use when is before any control points. /// The active control point at , or a fallback if none found. - internal static T BinarySearchWithFallback(IReadOnlyList list, double time, T fallback) + public static T BinarySearchWithFallback(IReadOnlyList list, double time, T fallback) where T : class, IControlPoint { return BinarySearch(list, time) ?? fallback; @@ -208,7 +208,7 @@ namespace osu.Game.Beatmaps.ControlPoints /// The list to search. /// The time to find the control point at. /// The active control point at . - internal static T BinarySearch(IReadOnlyList list, double time) + public static T BinarySearch(IReadOnlyList list, double time) where T : class, IControlPoint { if (list == null)