position method

  1. @override
double position(
  1. double t
)
override

Position at time t (seconds).

Implementation

@override
double position(double t) {
  if (t <= 0) return position0;
  final delta = target - position0;
  // Logistic growth model: approaches target asymptotically
  final pull = 1.0 - 1.0 / (1.0 + strength * t * t);
  return position0 + delta * pull.clamp(0.0, 1.0);
}