From 7f7a69448659e2d8d62655f275f697dad19b6fe8 Mon Sep 17 00:00:00 2001 From: randomuser Date: Mon, 18 Oct 2021 20:15:59 -0500 Subject: [PATCH] remove comments from boid.c --- c/boid.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/c/boid.c b/c/boid.c index 7c659e0..629d3fc 100644 --- a/c/boid.c +++ b/c/boid.c @@ -156,9 +156,6 @@ void updateBoid(boid *b, boid *chain, int id, double average) { boid *c = chain; while(c) { if(c->id != id) { -// printf("boid %i is being pinged by boid %i\n", c->id, b->id); -// printf("boid %i is %f units away from boid %i\n", c->id, -// distance(c->p, b->p), b->id); int dist = distance(c->p, b->p); if(dist < 50) toTurn += dist / 75; } @@ -167,7 +164,6 @@ void updateBoid(boid *b, boid *chain, int id, double average) { int centerw = w / 2 - b->p->x; int centerh = h / 2 - b->p->y; double deg = atan((double)centerh / (double)centerw) * 180/M_PI; -// printf("%f %i %i %i: degrees\n", deg, centerw, centerh, sign(deg)); toTurn += sign(deg) * 0.5; toTurn += (average - c->rot) * 0.4; if(b->p->x > w) b->p->x = 0; @@ -189,20 +185,6 @@ int main() { boid *b = mkBoid(100, 100, 0); randomBoids(b, 100); while(1) { -/* - while(XPending(d)) { - XNextEvent(d, &e); - if(e.type == MotionNotify) { - XClearWindow(d, w); - boid *ptr = b; - while(ptr) { - updateBoid(ptr, b, ptr->id, averageHeading(b)); - renderBoid(ptr); - ptr = ptr->next; - } - } - } -*/ XClearWindow(d, w); boid *ptr = b; while(ptr) {