1. override
bool step(double time)

Called when a significant change in the interval is detected. Subclasses must decide if the current simulation must be switched (or updated).

Must return true if the simulation was switched in this step, otherwise false.

If this function returns true, then currentSimulation must start returning a new value.

Source

@override
bool step(double time) => _chooseSimulation(
    _currentSimulation.x(time - _offset),
    _currentSimulation.dx(time - _offset), time);