From d31c10a01e53ad14305e52f8abd29d9ef84fe983 Mon Sep 17 00:00:00 2001 From: Anstro Pleuton <121956207+anstropleuton@users.noreply.github.com> Date: Tue, 19 May 2026 22:18:28 +0530 Subject: [PATCH] Adjust segment calculation in DrawRectangleRounded to be consistent with DrawRectangleRoundedLinesEx (#5875) --- src/rshapes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rshapes.c b/src/rshapes.c index c06f20462..69c1dacea 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -960,7 +960,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co { // Calculate the maximum angle between segments based on the error rate (usually 0.5f) float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/radius, 2) - 1); - segments = (int)(ceilf(2*PI/th)/4.0f); + segments = (int)(ceilf(2*PI/th)/2.0f); if (segments <= 0) segments = 4; }