@Override
    protected void updateAnimation(double p) {
        switch (hueStrategy) {
            case (HUE_BACKWARDS) : {
                cH = (float)(((fH - iH)*p + iH - 1)%1);
                break;
            }
            case (HUE_FORWARDS) : {
                cH = (float)(((fH - iH)*p + iH + 1)%1);
                break;
            }
            case (HUE_FORWARDS_LOOP) : {
                cH = (float)((((fH - iH == 0) ? 1 : fH - iH)*p + iH + 1)%1);
                break;
            }
            case (HUE_BACKWARDS_LOOP) : {
                cH = (float)((((fH - iH == 0) ? -1 : fH - iH)*p + iH - 1)%1);
                break;
            }
            default : {
                if (Math.abs(fH - iH) <= 0.5) {
                    cH = (float) (iH + p * (fH - iH));
                } else if (fH > iH) {
                    cH = (float) (iH - p * (1 - (fH - iH)) + 1);
                } else {
                    cH = (float) ((iH + p * (1 - (iH - fH))) % 1);
                }
            }
        }

        cS = (float)(iS + p*(fS - iS));
        cB = (float)(iB + p*(fB - iB));

        this.cColor.fromHSB(cH, cS, cB);
    }