Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2020
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1.         Iterator<Particle> iterator = particles.iterator();
  2.        
  3.         while(iterator.hasNext()) {
  4.            
  5.             Particle p = iterator.next();
  6.            
  7.             Iterator<Particle>downIterator = particles.iterator();
  8.             while(downIterator.hasNext()) {
  9.                
  10.                 Particle c = downIterator.next();
  11.                 if(!c.equals(p)) {
  12.                    
  13.                     if(p.locationX.equals(c.locationX)&&
  14.                             p.locationY.equals(c.locationY)&&
  15.                             p.locationZ.equals(c.locationZ)
  16.                             ) {
  17.                        
  18.                        
  19.                         downIterator.remove();
  20.                        
  21.                        
  22.                     }
  23.                    
  24.                    
  25.                    
  26.                 }
  27.                
  28.             }
  29.            
  30.            
  31.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement