mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Change default segments for l.g.circle to max(10, r)
This commit is contained in:
@@ -995,7 +995,11 @@ namespace opengl
|
||||
float x = (float)luaL_checknumber(L, 2);
|
||||
float y = (float)luaL_checknumber(L, 3);
|
||||
float radius = (float)luaL_checknumber(L, 4);
|
||||
int points = luaL_optint(L, 5, 10);
|
||||
int points;
|
||||
if (lua_gettop(L) > 4)
|
||||
points = lua_tointeger(L, 5);
|
||||
else
|
||||
points = radius > 10 ? radius : 10;
|
||||
instance->circle(mode, x, y, radius, points);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user