docs: public double calculateDistance(DoubleSolution individual, double[] lambda) {
      double scale;
      double distance;
  
      double[] vecInd = new double[problem.getNumberOfObjectives()];
      double[] vecProj = new double[problem.getNumberOfObjectives()];
  
      // vecInd has been normalized to the range [0,1]
      for (int i = 0; i < problem.getNumberOfObjectives(); i++) {
        vecInd[i] = (individual.getObjective(i) - idealPoint.getValue(i)) /
            (nadirPoint.getValue(i) - idealPoint.getValue(i));
      }
  
      scale = innerproduct(vecInd, lambda) / innerproduct(lambda, lambda);
      for (int i = 0; i < problem.getNumberOfObjectives(); i++) {
        vecProj[i] = vecInd[i] - scale * lambda[i];
      }
  
      distance = norm_vector(vecProj);
  
      return distance;
    }