From 1550a7f61da6df3e03984b7ed03e0c92188473ef Mon Sep 17 00:00:00 2001 From: Dukantic Date: Thu, 28 May 2026 10:21:09 +0200 Subject: [PATCH] fps theorique --- src/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index aae3b30..4d80419 100644 --- a/src/main.c +++ b/src/main.c @@ -14,8 +14,8 @@ #define SEED (5) #define WIDTH (1600) #define HEIGHT (1200) -#define SIM_WIDTH (800) -#define SIM_HEIGHT (600) +#define SIM_WIDTH (1600) +#define SIM_HEIGHT (1200) #define N_SIMULATION (100) const int FPS = 60; @@ -95,8 +95,9 @@ int main(int argc, char* argv[]) { if (next_frame) next_frame = 0; } - printf("Average time between frames : %.6fs\n", - avg_time_frame(timeframe)); + double avg_time = avg_time_frame(timeframe); + printf("Average time between frames : %.6fs (%.2ffps)\n", avg_time, + 1 / avg_time); SDL_DestroyTexture(tex); SDL_DestroyRenderer(ren); SDL_DestroyWindow(win);