riseAndFall function
Rises to 1 at peak and back, as iOS 27's droplets overshoot and swell.
Implementation
double riseAndFall(double time, double peak, double sharpness) {
if (time <= 0) {
return 0;
}
final x = time / peak;
return math.pow(x, sharpness) * math.exp(sharpness * (1 - x));
}