SpringToken class final
Mass-1 spring, integer-encoded so hashing stays bit-exact (motion brief
§2.6). Convert with SpringDescription.withDampingRatio(mass: 1, stiffness: k, ratio: zetaPermille / 1000) in the render layer.
- Annotations
Constructors
- SpringToken(int stiffness, int zetaPermille)
-
const
- SpringToken.fromJson(Object? json)
-
factory
Properties
- dampingRatio → double
-
ζ as a double.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stiffness → int
-
k (N/m with mass 1).
final
- zetaPermille → int
-
Damping ratio ζ × 1000 (bounce = 1 − ζ).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → List< int> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override