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