From f334a24f798a1335768aa099a5db5a248e65eb72 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 27 May 2015 18:30:17 -0300 Subject: [PATCH] Potentially better calculation for the default number of points in the rounded-rect variant of love.graphics.rectangle. --- src/modules/graphics/opengl/wrap_Graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index 05b3d8ee6..c2ae34437 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -1542,7 +1542,7 @@ int w_rectangle(lua_State *L) int points; if (lua_isnoneornil(L, 8)) - points = rx + ry > 20 ? (int)((rx + ry) / 4) : 10; + points = std::max(rx, ry) > 20.0 ? (int)(std::max(rx, ry) / 2) : 10; else points = luaL_checkint(L, 8);