private void limitVelocity() {
		assert(velocities != null);
		for(int i = 0; i < velocities.length; i++){
			for(int k = 0; k < velocities[i].length; k++){
				if(velocities[i][k] < 0 - maxVelocity[i]){
					velocities[i][k] = 0 - maxVelocity[i];
				}else if(velocities[i][k] > maxVelocity[i]){
					velocities[i][k] = maxVelocity[i];
				}
			}
		}

	}