dx method

  1. @override
double dx(
  1. double time
)
override

The velocity of the object in the simulation at the given time.

Implementation

@override
double dx(double time) {
  if (time > _finalTime) {
    return 0;
  }
  return _v * math.pow(_drag, time) - _constantDeceleration * time;
}