// filtre Mitchell
function result = mitchellFilter(value)

  // constantes
  B = (1.0 / 3.0);
  C = (1.0 / 3.0);
  
  if (value < 0.0) 
     value  = -value;
  end;

  tt = sqr(value);
  if (value < 1.0) 
    value  = (((12.0 - 9.0 * B - 6.0 * C) * (Value * tt)) + ((-18.0 + 12.0 * B + 6.0 * C) * tt) + (6.0 - 2 * B));
    result = value / 6.0;
  else
    if (value < 2.0) 
       value = (((-1.0 * B - 6.0 * C) * (Value * tt)) + ((6.0 * B + 30.0 * C) * tt) + ((-12.0 * B - 48.0 * C) * Value) + (8.0 * B + 24 * C));
       result = value / 6.0;
    else
       result = 0.0;
    end;
  end;

endfunction;