mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 17:17:26 +08:00
verify n<=3 in minCircleTrivial
This commit is contained in:
parent
d0f12006a4
commit
40cfaabc53
@ -269,6 +269,9 @@ namespace osu.Game.Utils
|
||||
// Function to return the minimum enclosing circle for N <= 3
|
||||
private static (Vector2, float) minCircleTrivial(ReadOnlySpan<Vector2> points)
|
||||
{
|
||||
if (points.Length > 3)
|
||||
throw new ArgumentException("Number of points must be at most 3", nameof(points));
|
||||
|
||||
switch (points.Length)
|
||||
{
|
||||
case 0:
|
||||
|
Loading…
Reference in New Issue
Block a user