From 508f7e0c110d1946b7a66c6ba60d22613f5e58a2 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Fri, 21 Jul 2023 09:12:02 +0200 Subject: [PATCH] WIP: simplifications avant restructuration. Is OK --- src/graphics/buffers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/buffers.c b/src/graphics/buffers.c index ac9c68a..9ac1a0d 100644 --- a/src/graphics/buffers.c +++ b/src/graphics/buffers.c @@ -320,9 +320,9 @@ static bool compute_space_3D (int x, for (j = 0; j < y; j++){ for (k = 0; k < z; k++){ - vx = (2 * i / (x - 1) - 1) * ((x - 1) / max); - vy = (2 * j / (y - 1) - 1) * ((y - 1) / max); - vz = (2 * k / (z - 1) - 1) * ((z - 1) / max); + vx = (2 * i / (x - 1) - 1) * (x - 1) / max; + vy = (2 * j / (y - 1) - 1) * (y - 1) / max; + vz = (2 * k / (z - 1) - 1) * (z - 1) / max; *(vertex_origin + vertex_ndx + 0) = vx / 2; *(vertex_origin + vertex_ndx + 1) = vy;