MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / isSpringAtRest

Function isSpringAtRest

packages/core/src/animation/spring.ts:66–73  ·  view source on GitHub ↗
(
  value: number,
  target: number,
  velocity: number,
  config: NormalizedSpringConfig,
)

Source from the content-addressed store, hash-verified

64}
65
66export function isSpringAtRest(
67 value: number,
68 target: number,
69 velocity: number,
70 config: NormalizedSpringConfig,
71): boolean {
72 return Math.abs(velocity) <= config.restSpeed && Math.abs(target - value) <= config.restDelta;
73}
74
75export function stepSpring(
76 state: SpringState,

Callers 4

stepSpringFunction · 0.85
useSpringFunction · 0.85
useAnimatedValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected