Calculating the maximum diagonal distance in a given set of points · HackerTrans