From cce1917e3a6c82aa75640d858865ad30deaedc68 Mon Sep 17 00:00:00 2001 From: Mike Green Date: Sun, 5 Jan 2020 23:41:08 +0000 Subject: [PATCH] Changed minimum vertices for circle shapes from 4 to 3 to allow drawing of triangles --- src/shapes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shapes.c b/src/shapes.c index 0c533df0b..d10fef4ae 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -215,7 +215,7 @@ void DrawCircleSector(Vector2 center, float radius, int startAngle, int endAngle endAngle = tmp; } - if (segments < 4) + if (segments < 3) { // Calculate how many segments we need to draw a smooth circle, taken from https://stackoverflow.com/a/2244088 #define CIRCLE_ERROR_RATE 0.5f @@ -307,7 +307,7 @@ void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, int end endAngle = tmp; } - if (segments < 4) + if (segments < 3) { // Calculate how many segments we need to draw a smooth circle, taken from https://stackoverflow.com/a/2244088 #ifndef CIRCLE_ERROR_RATE