docs: @Override
  	public double getQuantile(double quantile) {
  		if(isDeterministic()) {
  			return valueIfNonStochastic;
  		}
  		if(size() == 0) {
  			return Double.NaN;
  		}
  
  		double[] realizationsSorted = realizations.clone();
  		java.util.Arrays.sort(realizationsSorted);
  
  		int indexOfQuantileValue = Math.min(Math.max((int)Math.round((size()+1) * quantile - 1), 0), size()-1);
  
  		return realizationsSorted[indexOfQuantileValue];
  	}