Calculating the maximum diagonal distance in a given set of points | Hacker News Reader