elasticInOut static method
Implementation
static double elasticInOut(double t) {
const c5 = (2 * math.pi) / 4.5;
if (t == 0 || t == 1) return t;
if (t < .5) {
return -(math.pow(2, 20 * t - 10) * math.sin((20 * t - 11.125) * c5)) / 2;
}
return (math.pow(2, -20 * t + 10) * math.sin((20 * t - 11.125) * c5)) / 2 +
1;
}