docs: double psfunc3(double x, double t1, double t2, int dim, int type) {
      // type:  the type of curve 
      // css:   the class of index
      double beta;
      beta = 0.0;
  
      dim++;
  
      if (type == 31) {
        double xy = 4 * (x - 0.5);
        double rate = 1.0 * dim / nvar;
        beta = xy - 4 * (t1 * t1 * rate + t2 * (1.0 - rate)) + 2;
      }
  
      if (type == 32) {
        double theta = 2 * Math.PI * t1 + dim * Math.PI / nvar;
        double xy = 4 * (x - 0.5);
        beta = xy - 2 * t2 * Math.sin(theta);
      }
  
      return beta;
    }