From 1e828eec57cff31731153478823bc411bc0bf82d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 16 Jul 2024 21:14:39 -0700 Subject: [PATCH] Fixed warning C4244: '=': conversion from 'float' to 'int', possible loss of data --- test/testspritesurface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testspritesurface.c b/test/testspritesurface.c index 7b855667b..4abd7efd7 100644 --- a/test/testspritesurface.c +++ b/test/testspritesurface.c @@ -140,8 +140,8 @@ int main(int argc, char *argv[]) positions[i].y = SDL_rand(WINDOW_HEIGHT - sprite_h); positions[i].w = sprite_w; positions[i].h = sprite_h; - velocities[i].x = 0.0f; - velocities[i].y = 0.0f; + velocities[i].x = 0; + velocities[i].y = 0; while (velocities[i].x == 0.f && velocities[i].y == 0.f) { velocities[i].x = (SDL_rand(MAX_SPEED * 2 + 1)) - MAX_SPEED; velocities[i].y = (SDL_rand(MAX_SPEED * 2 + 1)) - MAX_SPEED;