SpringDescription class

Structure that describes a spring's constants.

Used to configure a SpringSimulation.

Constructors

SpringDescription({required double mass, required double stiffness, required double damping})
Creates a spring given the mass, stiffness, and the damping coefficient.
const
SpringDescription.withDampingRatio({required double mass, required double stiffness, double ratio = 1.0})
Creates a spring given the mass (m), stiffness (k), and damping ratio (ΞΆ). The damping ratio describes a gradual reduction in a spring oscillation. By using the damping ratio, you can define how rapidly the oscillations decay from one bounce to the next.

Properties

damping double
The damping coefficient (c).
final
hashCode int
The hash code for this object.
no setterinherited
mass double
The mass of the spring (m).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stiffness double
The spring constant (k).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited