////////|SlitWidth|Length|1E-05|0|1
////////|SlitDistance|Length|5E-05|0|1
double realPart = 0.0;
double imaginaryPart = 0.0;

 if ((x > (-0.5 * SlitWidth - 0.5 * SlitDistance) && x < (+0.5 * SlitWidth - 0.5 * SlitDistance)) ||
      ((x > (-0.5 * SlitWidth + 0.5 * SlitDistance) && x < (+0.5 * SlitWidth + 0.5 * SlitDistance)) )  ){
      
      realPart =1;
}

return new Complex(realPart, imaginaryPart);