ClampedSimulation constructor Null safety

ClampedSimulation(
  1. Simulation simulation,
  2. {double xMin = double.negativeInfinity,
  3. double xMax = double.infinity,
  4. double dxMin = double.negativeInfinity,
  5. double dxMax = double.infinity}
)

Creates a ClampedSimulation that clamps the given simulation.

The named arguments specify the ranges for the clamping behavior, as applied to x and dx.

Implementation

ClampedSimulation(
  this.simulation, {
  this.xMin = double.negativeInfinity,
  this.xMax = double.infinity,
  this.dxMin = double.negativeInfinity,
  this.dxMax = double.infinity,
}) : assert(simulation != null),
     assert(xMax >= xMin),
     assert(dxMax >= dxMin);