Skip to content

Commit d31c10a

Browse files
Adjust segment calculation in DrawRectangleRounded to be consistent with DrawRectangleRoundedLinesEx (#5875)
1 parent c04e573 commit d31c10a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/rshapes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
960960
{
961961
// Calculate the maximum angle between segments based on the error rate (usually 0.5f)
962962
float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/radius, 2) - 1);
963-
segments = (int)(ceilf(2*PI/th)/4.0f);
963+
segments = (int)(ceilf(2*PI/th)/2.0f);
964964
if (segments <= 0) segments = 4;
965965
}
966966

0 commit comments

Comments
 (0)