mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
handle love.graphics.arc being passed identical angles
--HG-- branch : minor
This commit is contained in:
@@ -990,6 +990,7 @@ namespace opengl
|
|||||||
void Graphics::arc(DrawMode mode, float x, float y, float radius, float angle1, float angle2, int points)
|
void Graphics::arc(DrawMode mode, float x, float y, float radius, float angle1, float angle2, int points)
|
||||||
{
|
{
|
||||||
float angle = angle2 - angle1;
|
float angle = angle2 - angle1;
|
||||||
|
if (angle == 0) return;
|
||||||
while (angle < 0) angle += LOVE_M_PI * 2;
|
while (angle < 0) angle += LOVE_M_PI * 2;
|
||||||
if(points <= 0) points = 1;
|
if(points <= 0) points = 1;
|
||||||
float angle_shift = (angle / points);
|
float angle_shift = (angle / points);
|
||||||
|
|||||||
Reference in New Issue
Block a user