Merge branch 'raysan5:master' into master

This commit is contained in:
Jon Daniel 2025-03-18 19:17:35 +01:00 committed by GitHub
commit f8fcce2e18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,6 +285,7 @@ void DrawCircleV(Vector2 center, float radius, Color color)
// Draw a piece of a circle // Draw a piece of a circle
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
{ {
if (startAngle == endAngle) return;
if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
@ -376,6 +377,7 @@ void DrawCircleSector(Vector2 center, float radius, float startAngle, float endA
// Draw a piece of a circle outlines // Draw a piece of a circle outlines
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
{ {
if (startAngle == endAngle) return;
if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero issue if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero issue
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)