docs: @Override
    public double getWeight(double distance, double max, double stddev) {
      if(stddev <= 0) {
        return 1;
      }
      double scaleddistance = distance / (scaling * stddev);
      // After this, the result would be negative.
      if(scaleddistance >= 1.0) {
        return 0.0;
      }
      return 1.0 - scaleddistance * scaleddistance;
    }