From 2207f6bc9aca6be8198ce9f6c057d4c60757c6bb Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Fri, 28 Mar 2025 13:11:35 -0400
Subject: [PATCH] examples/renderer/affine-textures: Fixed compiler warnings.
---
examples/renderer/19-affine-textures/affine-textures.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/renderer/19-affine-textures/affine-textures.c b/examples/renderer/19-affine-textures/affine-textures.c
index 4dead3aae01fa..6cde3bae8a52f 100644
--- a/examples/renderer/19-affine-textures/affine-textures.c
+++ b/examples/renderer/19-affine-textures/affine-textures.c
@@ -81,13 +81,13 @@
SDL_AppResult SDL_AppIterate(void *appstate) {
const float x0 = 0.5f * WINDOW_WIDTH;
const float y0 = 0.5f * WINDOW_HEIGHT;
- const float px = SDL_min(WINDOW_WIDTH, WINDOW_HEIGHT) / SDL_sqrt(3.0);
+ const float px = SDL_min(WINDOW_WIDTH, WINDOW_HEIGHT) / SDL_sqrtf(3.0f);
const Uint64 now = SDL_GetTicks();
const float rad = (((float) ((int) (now % 4000))) / 4000.0f) * SDL_PI_F * 2;
- const float cos = SDL_cos(rad);
- const float sin = SDL_sin(rad);
- const float k[3] = { 3.0f / SDL_sqrt(50.0), 4.0f / SDL_sqrt(50.0), 5.0f / SDL_sqrt(50.0)};
+ const float cos = SDL_cosf(rad);
+ const float sin = SDL_sinf(rad);
+ const float k[3] = { 3.0f / SDL_sqrtf(50.0f), 4.0f / SDL_sqrtf(50.0f), 5.0f / SDL_sqrtf(50.0f)};
float mat[9] = {
cos + (1.0f-cos)*k[0]*k[0], -sin*k[2] + (1.0f-cos)*k[0]*k[1], sin*k[1] + (1.0f-cos)*k[0]*k[2],
sin*k[2] + (1.0f-cos)*k[0]*k[1], cos + (1.0f-cos)*k[1]*k[1], -sin*k[0] + (1.0f-cos)*k[1]*k[2],