public double scale(double i){
        if(i>0){
            i = (i-0.1)*10.0/9.0;
            if(i < 0)
                i = 0;
        }
        else if(i<0){
            i = (i+0.1)*10.0/9.0;
            if(i > 0)
                i = 0;
        }
        return i;
    }