code: public float sMulti(float y, int A, int B, float C) {
      float tmp1, tmp2;
  
      tmp1 = ((float) 4.0 * A + (float) 2.0) *
        (float) Math.PI *
        ((float) 0.5 - Math.abs(y - C) / ((float) 2.0 * ((float) Math.floor(C - y) + C)));
      tmp2 = (float) 4.0 * B *
        (float) StrictMath.pow(Math.abs(y - C) / ((float) 2.0 * ((float) Math.floor(C - y) + C))
          , (float) 2.0);
  
      return correctTo01(((float) 1.0 + (float) Math.cos(tmp1) + tmp2) / (B + (float) 2.0));
    }
docs: sMulti transformation