From 747aa7c8c9ad1b34a46da5bc10c3468ecb9ef191 Mon Sep 17 00:00:00 2001 From: Jakub-Prus <68164819+Jakub-Prus@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:35:55 +0100 Subject: [PATCH] add Comments --- cw 9/src/ex_9_1.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cw 9/src/ex_9_1.hpp b/cw 9/src/ex_9_1.hpp index dce6cad..0c302f7 100644 --- a/cw 9/src/ex_9_1.hpp +++ b/cw 9/src/ex_9_1.hpp @@ -379,6 +379,7 @@ void initBoids() b.x = 0; b.y = 0; b.z = 0; + // code with chatGPT help b.vx = ((float)rand() / RAND_MAX) * MAX_SPEED * 2.0f - MAX_SPEED; b.vy = ((float)rand() / RAND_MAX) * MAX_SPEED * 2.0f - MAX_SPEED; b.vz = ((float)rand() / RAND_MAX) * MAX_SPEED * 2.0f - MAX_SPEED; @@ -446,6 +447,7 @@ void updateBoid(Boid& b) { b.z += b.vz; + // code with chatGPT help if (b.x < -1.0f) { b.vx = abs(b.vx); }