@Override
    public double getClippedValue(double input, double clip) {
        double result = 0;
        if (input >= a && input <= c) {
            result = (input - a) / (c - a);
            if (result < clip) {
                return result;
            } else {
                return clip;
            }
        } else if (input >= c && input <= b) {
            result = (input - b) / (c - b);
            if (result < clip) {
                return result;
            } else {
                return clip;
            }
        }
        return result;
    }