bounceOut = {
const a = 4.0 / 11.0, b = 8.0 / 11.0, c = 9.0 / 10.0;
const coeffs = new Float64Array([
7.5625, 0, 0,
9.075, -9.9, 3.4,
4356.0 / 361.0, -35442.0 / 1805.0, 16061.0 / 1805.0,
10.8, -20.52, 10.72
]);
return function bounceOut(t) {
const i = 3 * ((t > a) + (t > b) + (t > c));
return t * (t * coeffs[i] + coeffs[i+1]) + coeffs[i+2];
}
}