x method

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

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

Implementation

@override
double x(double time) {
  if (time > _finalTime) {
    return finalX;
  }
  return _x + _v * math.pow(_drag, time) / _dragLog - _v / _dragLog - ((_constantDeceleration / 2) * time * time);
}