diff --git a/test/testgeometry.c b/test/testgeometry.c index 07a31a14b..ebfe206df 100644 --- a/test/testgeometry.c +++ b/test/testgeometry.c @@ -12,9 +12,10 @@ /* Simple program: draw a RGB triangle, with texture */ -#include -#include #include "testutils.h" +#include +#include +#include #ifdef SDL_PLATFORM_EMSCRIPTEN #include @@ -136,7 +137,7 @@ static void loop(void) cx += translate_cx; cy += translate_cy; - a = (angle * 3.1415f) / 180.0f; + a = (angle * SDL_PI_F) / 180.0f; verts[0].position.x = cx + d * SDL_cosf(a); verts[0].position.y = cy + d * SDL_sinf(a); verts[0].color.r = 1.0f; @@ -144,7 +145,7 @@ static void loop(void) verts[0].color.b = 0; verts[0].color.a = 1.0f; - a = ((angle + 120) * 3.1415f) / 180.0f; + a = ((angle + 120) * SDL_PI_F) / 180.0f; verts[1].position.x = cx + d * SDL_cosf(a); verts[1].position.y = cy + d * SDL_sinf(a); verts[1].color.r = 0; @@ -152,7 +153,7 @@ static void loop(void) verts[1].color.b = 0; verts[1].color.a = 1.0f; - a = ((angle + 240) * 3.1415f) / 180.0f; + a = ((angle + 240) * SDL_PI_F) / 180.0f; verts[2].position.x = cx + d * SDL_cosf(a); verts[2].position.y = cy + d * SDL_sinf(a); verts[2].color.r = 0;