designSpringTolerance top-level constant

Tolerance const designSpringTolerance

When a spring-driven controller counts as settled, in the controller's own units (a 0–1 progress, or dp for a position):

  • distance 0.001 — within a thousandth of the target: under a pixel for any travel up to 1000 dp on a progress controller;
  • velocity 0.1 units/s — above ω₀ × 0.001 for every Material spring (ω₀ = √k ≤ 62 rad/s at k = 3800), so once a spring's swing is inside the distance bound the velocity bound already holds; it exists so an underdamped spring crossing the target at speed is not taken as settled.

On settling the controller lands exactly on the target (SpringSimulation's snapToEnd).

Implementation

const Tolerance designSpringTolerance = Tolerance(
  distance: 0.001,
  velocity: 0.1,
);