From 756e148b7187175488df3969960f648d630bbc1e Mon Sep 17 00:00:00 2001 From: PLAZMAMA Date: Sat, 2 May 2026 03:53:40 -0400 Subject: [PATCH] Fix float truncation in SPEED and MIN_TICKS constants Both were declared as const int, silently truncating their float values. Moved to a const float line so the types match the intent. --- ocean/minimal/minimal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocean/minimal/minimal.h b/ocean/minimal/minimal.h index c77f17af8..9b0125608 100644 --- a/ocean/minimal/minimal.h +++ b/ocean/minimal/minimal.h @@ -6,8 +6,8 @@ #define AGENTS 8 #define TARGETS 8 -const int WIDTH = 1080, HEIGHT = 720, COOLDOWN = 30, TYPES = 4, SPEED = 20.0f; -const int MIN_TICKS = COOLDOWN*AGENTS/(float)TARGETS; +const int WIDTH = 1080, HEIGHT = 720, COOLDOWN = 30, TYPES = 4; +const float SPEED = 20.0f, MIN_TICKS = COOLDOWN*AGENTS/(float)TARGETS; float clip(float val, float min, float max) { return fmaxf(fminf(val, max), min); } // Required struct. Floats only, n last