public float getRamp(float pSecondsElapsed, float pDuration) { float percentage = pSecondsElapsed / pDuration; if (percentage < 0.5f) { return(0.5f * RampQuintIn.getValue(2 * percentage)); } else { return(0.5f + 0.5f * RampQuintOut.getValue(percentage * 2 - 1)); } }
public float getRamp(float pSecondsElapsed, float pDuration) { return(RampQuintIn.getValue(pSecondsElapsed / pDuration)); }