Applies a decelerating interpolation function to the input value t. Returns a value between 0 and 1 based on the input.
t
double decelerate(double t) { t = 1.0 - t; return 1.0 - t * t; }