/// <summary> /// Calculate the easing to the specified time. /// </summary> /// <param name="time">Time.</param> /// <returns> /// The easing to the time. /// </returns> public float Calculate(float time) { if (time < 0.5f) { return(0.5f * (1 - InBounceEasing.GetBounce(1 - time * 2))); } else { return(0.5f * InBounceEasing.GetBounce(time * 2 - 1) + 0.5f); } }
/// <summary> /// Calculate the easing to the specified time. /// </summary> /// <param name="time">Time.</param> /// <returns> /// The easing to the time. /// </returns> public float Calculate(float time) { return(InBounceEasing.GetBounce(time)); }