public double determineDirection(int x, int y, int width, int height) {
		if(x < 0){
			return Math.random()*Math.PI - Math.PI/2;
		} else if(x > width) {
			return Math.random()*Math.PI + Math.PI/2;
		}
		
		if(y < 0) {
			return Math.random()*Math.PI;
		} else if(y > height) {
			return Math.random()*-Math.PI;
		}
		return 0;
	}