mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 10:23:04 +08:00
Revert "add a max depth to prevent stack overflow"
This reverts commit bf245aa9d6
.
This commit is contained in:
parent
bf245aa9d6
commit
c857de3a9a
@ -305,11 +305,8 @@ namespace osu.Game.Utils
|
||||
// n represents the number of points in P that are not yet processed.
|
||||
private static (Vector2, float) welzlHelper(List<Vector2> points, ReadOnlySpan<Vector2> r, int n)
|
||||
{
|
||||
const int max_depth = 4000;
|
||||
|
||||
// Base case when all points processed or |R| = 3
|
||||
// To prevent stack overflow, we stop at a certain depth and give an approximate answer
|
||||
if (n == 0 || r.Length == 3 || points.Count - n >= max_depth)
|
||||
if (n == 0 || r.Length == 3)
|
||||
return minCircleTrivial(r);
|
||||
|
||||
// Pick a random point randomly
|
||||
|
Loading…
Reference in New Issue
Block a user