docs: static double weightedAverage(double x1, double w1, double x2, double w2) {
          if (x1 <= x2) {
              return weightedAverageSorted(x1, w1, x2, w2);
          } else {
              return weightedAverageSorted(x2, w2, x1, w1);
          }
      }