float
xMax = Float.NEGATIVE_INFINITY,
xMin = Float.POSITIVE_INFINITY,
yMin = Float.POSITIVE_INFINITY,
yMax = Float.NEGATIVE_INFINITY;
<BUG>for ( int i = 0; i < physics.numberOfParticles(); ++i ) {
Particle p = physics.getParticle( i );
xMax = max( xMax, p.position().x() );</BUG>
xMin = min( xMin, p.position().x() );
yMin = min( yMin, p.position().y() );

float
xMax = Float.NEGATIVE_INFINITY,
xMin = Float.POSITIVE_INFINITY,
yMin = Float.POSITIVE_INFINITY,
yMax = Float.NEGATIVE_INFINITY;
for (int i = 0; i < physics.numberOfParticles(); ++i) {
Particle p = physics.getParticle(i);
if ((i >= 2) && ((p == center0) || (p == center1) || (invisible.contains(p)))) continue;
xMax = max( xMax, p.position().x() );
xMin = min( xMin, p.position().x() );
yMin = min( yMin, p.position().y() );
