public static float easeInOut(float t) { if (t <= 0.5f) { return(Elastic.easeIn(t * 2) / 2); } else { return((Elastic.easeOut((t - 0.5f) * 2.0f) / 2) + 0.5f); } }