Changed minimum vertices for circle shapes from 4 to 3 to allow drawing of triangles

This commit is contained in:
Mike Green 2020-01-05 23:41:08 +00:00
parent 615cb35d96
commit cce1917e3a

View File

@ -215,7 +215,7 @@ void DrawCircleSector(Vector2 center, float radius, int startAngle, int endAngle
endAngle = tmp; 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 // Calculate how many segments we need to draw a smooth circle, taken from https://stackoverflow.com/a/2244088
#define CIRCLE_ERROR_RATE 0.5f #define CIRCLE_ERROR_RATE 0.5f
@ -307,7 +307,7 @@ void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, int end
endAngle = tmp; 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 // Calculate how many segments we need to draw a smooth circle, taken from https://stackoverflow.com/a/2244088
#ifndef CIRCLE_ERROR_RATE #ifndef CIRCLE_ERROR_RATE