4 ms·
In the current implementation, yes. But the code should be structured to append neighbors to both boids[i] and boids[j] simultaneously. This is especially crit
by fromthestart 8y ago
In the current implementation, yes. But the code should be structured to append neighbors to both boids[i] and boids[j] simultaneously.
This is especially critical in physics simulations like these, where niave particle interaction algorithms can be an expensive O(n^2).