code: public float sDecept(float y, float A, float B, float C) {
      float tmp, tmp1, tmp2;
  
      tmp1 = (float) Math.floor(y - A + B) * ((float) 1.0 - C + (A - B) / B) / (A - B);
      tmp2 =
        (float) Math.floor(A + B - y) * ((float) 1.0 - C + ((float) 1.0 - A - B) / B) / ((float) 1.0
          - A - B);
  
      tmp = Math.abs(y - A) - B;
  
      return correctTo01((float) 1 + tmp * (tmp1 + tmp2 + (float) 1.0 / B));
    }
docs: sDecept transformation