A simulation that applies limits to another simulation.

The limits are only applied to the other simulation's outputs. For example, if a maximum position was applied to a gravity simulation with the particle's initial velocity being up, and the accerelation being down, and the maximum position being between the initial position and the curve's apogee, then the particle would return to its initial position in the same amount of time as it would have if the maximum had not been applied; the difference would just be that the position would be reported as pinned to the maximum value for the times that it would otherwise have been reported as higher.

Inheritance

Constructors

ClampedSimulation(Simulation simulation, { double xMin: double.NEGATIVE_INFINITY, double xMax: double.INFINITY, double dxMin: double.NEGATIVE_INFINITY, double dxMax: double.INFINITY })

Creates a ClampedSimulation that clamps the given simulation.

Properties

dxMax double

The maximum to apply to dx.

read-only
dxMin double

The minimum to apply to dx.

read-only
simulation Simulation

The simulation being clamped. Calls to x, dx, and isDone are forwarded to the simulation.

read-only
xMax double

The maximum to apply to x.

read-only
xMin double

The minimum to apply to x.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited
tolerance Tolerance

How close to the actual end of the simulation a value at a particular time must be before isDone considers the simulation to be "done".

read / write, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

dx(double time) double

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

isDone(double time) bool

Whether the simulation is "done" at the given time.

x(double time) double

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

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited