rendered paste body public boolean CollisionPossible(Particle P){
if ((this.getX()).Distance(P.getX()) <= (this.CollisionRadius + P.CollisionRadius) )
{
// if particles interaction circles touch or overlap then return true
System.out.println("particles close enuff");
return true;
}
else return false;
}
/**
* Get within distance
* @param - Particle 1
* @param - Particle 2
* @param - distance to check
* @return boolean: true - particles are within that distance of each other
*/
public static boolean withinDist(Particle Q, Particle P, double dist)
{
if( (Q.getX()).Distance(P.getX()) <= dist ) return true;
return false;
}