easeInOut function
Applies an ease-in-out interpolation function to the input value t
.
Returns a value between 0 and 1 based on the input.
Implementation
double easeInOut(double t) {
return t < 0.5 ? 0.5 * pow(2 * t, 2) : 0.5 * (2 - pow(2 * (1 - t), 2));
}