osukey/osu.Game/Rulesets/Objects/LinearApproximator.cs
2018-11-01 19:16:44 +09:00

23 lines
597 B
C#

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using OpenTK;
namespace osu.Game.Rulesets.Objects
{
public readonly struct LinearApproximator : IApproximator
{
public List<Vector2> Approximate(ReadOnlySpan<Vector2> controlPoints)
{
var result = new List<Vector2>(controlPoints.Length);
foreach (var c in controlPoints)
result.Add(c);
return result;
}
}
}