A spring simulation.

Models a particle attached to a spring that follows Hooke's law.

Inheritance
Implemented by

Constructors

SpringSimulation(SpringDescription desc, double start, double end, double velocity)

Creates a spring simulation from the provided spring description, start distance, end distance, and initial velocity.

Properties

type → SpringType

The kind of spring being simulated, for debugging purposes.

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