code: public static double of(double... data) {
      double sum = 0.;
      for(double v : data) {
        sum += v;
      }
      return sum / data.length;
    }
docs: Static helper function.
  
  @param data Data to compute the mean for.
  @return Mean