particleBroadphase
fun particleBroadphase(canvas: Canvas, world: PhysicsWorld, ahead: Duration, cellSize: Float = 16.0f, cellColor: Color = CELL, pairColor: Color = PAIR)(source)
Shows how a broadphase of cellSize sees every particle of world, each as the box it sweeps through in the next ahead: every cell a box is filed under, tinted once per box so busy cells glow brighter, and a line between the two particles of every pair that might touch. It finds them itself, so it shows particles that collide with nothing too.
Throws
if cellSize is not more than 0.