private void internalReflection(Atom a) {
		double radius = a.sigma * 0.5;
		byte hit = 0;
		if (a.rx + radius > getX() + getWidth()) // hit east side
			hit |= 1;
		else if (a.rx - radius < getX()) // hit west side
			hit |= 2;
		if (a.ry + radius > getY() + getHeight()) // hit south side
			hit |= 4;
		else if (a.ry - radius < getY()) // hit north side
			hit |= 8;
		if ((hit & 1) == 1)
			a.vx = -Math.abs(a.vx);
		if ((hit & 2) == 2)
			a.vx = Math.abs(a.vx);
		if ((hit & 4) == 4)
			a.vy = -Math.abs(a.vy);
		if ((hit & 8) == 8)
			a.vy = Math.abs(a.vy);
	}