1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 15:17:44 +08:00

verify n<=3 in minCircleTrivial

This commit is contained in:
OliBomby 2024-09-23 11:43:36 +02:00
parent d0f12006a4
commit 40cfaabc53

View File

@ -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: