diff --git a/osu.Game.Modes.Osu/Objects/BezierApproximator.cs b/osu.Game.Modes.Osu/Objects/BezierApproximator.cs index 9a4be51240..f03e1c0738 100644 --- a/osu.Game.Modes.Osu/Objects/BezierApproximator.cs +++ b/osu.Game.Modes.Osu/Objects/BezierApproximator.cs @@ -13,7 +13,7 @@ public class BezierApproximator private Vector2[] subdivisionBuffer1; private Vector2[] subdivisionBuffer2; - private const float TOLERANCE = 0.5f; + private const float TOLERANCE = 0.25f; private const float TOLERANCE_SQ = TOLERANCE * TOLERANCE; public BezierApproximator(List controlPoints) @@ -36,7 +36,7 @@ public BezierApproximator(List controlPoints) private static bool IsFlatEnough(Vector2[] controlPoints) { for (int i = 1; i < controlPoints.Length - 1; i++) - if ((controlPoints[i - 1] - 2 * controlPoints[i] + controlPoints[i + 1]).LengthSquared > TOLERANCE_SQ) + if ((controlPoints[i - 1] - 2 * controlPoints[i] + controlPoints[i + 1]).LengthSquared > TOLERANCE_SQ * 4) return false; return true; @@ -96,7 +96,6 @@ private void Approximate(Vector2[] controlPoints, List output) /// Creates a piecewise-linear approximation of a bezier curve, by adaptively repeatedly subdividing /// the control points until their approximation error vanishes below a given threshold. /// - /// The control points describing the curve. /// A list of vectors representing the piecewise-linear approximation. public List CreateBezier() {