springC

fun <T> springC(mass: Float, stiffness: Float, damping: Float, visibilityThreshold: T? = null): SpringSpec<T>

Creates a SpringSpec from physical mass-spring-damper system constants.

Parameters

mass

The mass of the object in motion. Must be positive and finite.

stiffness

The stiffness coefficient (spring constant k). Must be positive and finite.

damping

The damping coefficient (drag/friction c). Must be non-negative and finite.

visibilityThreshold

Optional threshold below which the animation is considered settled.