Use min instead of max to compute entity diameter