Modified WeightedMinDist to divide by both locations' weights when measuring distance.