BoundedFrictionSimulation constructor

BoundedFrictionSimulation(double drag, double position, double velocity, double _minX, double _maxX)

Creates a BoundedFrictionSimulation with the given arguments, namely: the fluid drag coefficient, a unitless value; the initial position, in the same length units as used for x; the initial velocity, in the same velocity units as used for dx, the minimum value for the position, and the maximum value for the position. The minimum and maximum values must be in the same units as the initial position, and the initial position must be within the given range.

Implementation

BoundedFrictionSimulation(
  double drag,
  double position,
  double velocity,
  this._minX,
  this._maxX
) : assert(position.clamp(_minX, _maxX) == position),
    super(drag, position, velocity);