Updated weighting for travelling in different directions in the cuboid_average function