update method
Update position/velocity toward equilibriumPos.
Implementation
(double, double) update(double pos, double vel, double equilibriumPos) {
final oldPos = pos - equilibriumPos;
final oldVel = vel;
final newPos = oldPos * _posPosCoef + oldVel * _posVelCoef + equilibriumPos;
final newVel = oldPos * _velPosCoef + oldVel * _velVelCoef;
return (newPos, newVel);
}