for (let i = 0; i < num; i++) {
                const n = neighbors[i];
                if (n !== boid) add(centroid, centroid, n.pos.curr);
            }