1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 06:52:53 +08:00

Change return type to List

This commit is contained in:
OliBomby 2022-10-31 11:39:41 +01:00
parent 414e21c657
commit 0461303895

View File

@ -39,13 +39,13 @@ namespace osu.Game.Rulesets.Objects
new[] { new Vector2d(1, 0), new Vector2d(1, 1.2447058f), new Vector2d(-0.8526471f, 2.118367f), new Vector2d(-2.6211002f, 7.854936e-06f), new Vector2d(-0.8526448f, -2.118357f), new Vector2d(1, -1.2447058f), new Vector2d(1, 0) }) new[] { new Vector2d(1, 0), new Vector2d(1, 1.2447058f), new Vector2d(-0.8526471f, 2.118367f), new Vector2d(-2.6211002f, 7.854936e-06f), new Vector2d(-0.8526448f, -2.118357f), new Vector2d(1, -1.2447058f), new Vector2d(1, 0) })
}; };
public static IEnumerable<Vector2> ConvertToLegacyBezier(IList<PathControlPoint> controlPoints, Vector2 position)
/// <summary> /// <summary>
/// Converts a slider path to bezier control point positions compatible with the legacy osu! client. /// Converts a slider path to bezier control point positions compatible with the legacy osu! client.
/// </summary> /// </summary>
/// <param name="controlPoints">The control points of the path.</param> /// <param name="controlPoints">The control points of the path.</param>
/// <param name="position">The offset for the whole path.</param> /// <param name="position">The offset for the whole path.</param>
/// <returns>The list of legacy bezier control point positions.</returns> /// <returns>The list of legacy bezier control point positions.</returns>
public static List<Vector2> ConvertToLegacyBezier(IList<PathControlPoint> controlPoints, Vector2 position)
{ {
Vector2[] vertices = new Vector2[controlPoints.Count]; Vector2[] vertices = new Vector2[controlPoints.Count];
for (int i = 0; i < controlPoints.Count; i++) for (int i = 0; i < controlPoints.Count; i++)