package yi.iu.processor.resample;

public class BellResampler extends Resampler
{
    public BellResampler () {
        super(); fwidth=1.5;
    }
    
    public BellResampler(int w, int h) {
        super(w,h); fwidth=1.5;
    }

    public double filter(double value)
    {
        if (value < 0.0) value = -value;
        
        if (value < 0.5) 
            return 0.75 - value*value;
        else if (value < 1.5) {
            value = value - 1.5;
            return 0.5 * value*value;
        }
        else
            return 0.0d;
    }

}