damp static method

double damp(
  1. double current,
  2. double target,
  3. double lambda,
  4. double deltaTime,
)

Implementation

static double damp(
  double current,
  double target,
  double lambda,
  double deltaTime,
) {
  final t = 1 - exp(-lambda * deltaTime);
  return lerp(current, target, t);
}