docs: @Reference(authors = "R. W. Sinnott", //
        title = "Virtues of the Haversine", //
        booktitle = "Sky and Telescope 68(2)", //
        bibkey = "journals/skytelesc/Sinnott84")
    public static double haversineFormulaRad(double lat1, double lon1, double lat2, double lon2) {
      if(lat1 == lat2 && lon1 == lon2) {
        return 0.;
      }
      // Haversine formula, higher precision at < 1 meters but maybe issues at
      // antipodal points with asin, atan2 is supposedly better (but slower).
      final double slat = sin((lat1 - lat2) * .5), slon = sin((lon1 - lon2) * .5);
      double a = slat * slat + slon * slon * cos(lat1) * cos(lat2);
      return a < .9 ? 2 * asin(sqrt(a)) : a < 1 ? 2 * atan2(sqrt(a), sqrt(1 - a)) : Math.PI;
    }